To date, it has become necessary to put the ruby script on periodic execution
Heard about cron scheduler
I'm currently working as root,
/usr/local/rvm/gems/ruby-2.0.0-p353/bin:/usr/local/rvm/gems/[email protected]/bin: /usr/local/rvm/rubies/ruby-2.0.0-p353/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/postgresql/9.3/bin:/usr/local/rvm/bin:
Ruby installed via RVM
In the file ~/.bashprofile
I’ll add crontab -e line to
* * * * * ruby /var/www/nw/x.rb
I’m getting to/var/www/syslog
(root) CMD(ruby /var/www/nw/x.rb)
Cron logs are not configured - the next line
(CRON) info(No MTA installed, discarding output)
Script actions are not executed
If you write ruby x.rb in the console - the script works, but not su root ruby x.rb - writes"ruby: no such file or directory"
How to solve this problem, what and where should I add?