Crontab rake job is not working with whenever gem in ruby

情到浓时终转凉″ 提交于 2020-01-14 05:46:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!