问题
This is my crontab file generated by whenever:
* * * * * /bin/bash -l -c 'cd /var/apps/path && RAILS_ENV=production echo "Testing" >> /new
* * * * * /bin/bash -l -c 'cd /var/apps/path && RAILS_ENV=production rake somegroup:rake_job --silent'
The first line is for test only and works as expected. However the rake job in the other line has nothing to do at all. In /var/log/syslog, both jobs are executed. Also tried using the absolute path of rake (/usr/local/rvm/gems/ruby-1.9.2-p136/bin/rake), still no luck. Don't know where to find error message. I'm using ubuntu 10.04TS server.
Any thoughts will be appreciated! ;)
J
回答1:
are you using rvm and gemsets ?
I think I've found a problem with Whenever and rvm's rvmrc file
来源:https://stackoverflow.com/questions/5176802/crontab-rake-job-is-not-working-with-whenever-gem-in-ruby