Hello,
Unable to invoke the custom rake task through cron under bundler.
Same task invoke without bundler. Anyone please suggest solution?
Here is the cron:
*/1 * * * * cd /home/rails_app && /usr/bin/bundle exec rake say_hi >>
/home/crontab_errors.txt
My application using ruby 1.9.2 and rails 2.3.11 with bundler.
On 2012-03-28 09:55:42, Priyanka P. wrote:
Hello,
Unable to invoke the custom rake task through cron under bundler.
Same task invoke without bundler. Anyone please suggest solution?
Here is the cron:
*/1 * * * * cd /home/rails_app && /usr/bin/bundle exec rake say_hi >>
/home/crontab_errors.txt
What did you observe? Perhaps add a 2>&1 to the end to get both
stdout and stderr instead of out just stdout into
crontab_errors.txt file.
If you are using rvm you may need to call set it up first. Here
is what we do in some of our crontabs with a system wide install
of rvm
30 10 * * * . /opt/rvm/scripts/rvm && (cd …; bundle exec “some_task”)
/Allan
Allan Wind
Life Integrity, LLC
http://lifeintegrity.com