On 2012-03-28 09:55:42, Priyanka Pathak 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>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.