Monday, February 27, 2012

Execute rake file in crontab(RVM)

While executing rake in crontab using rvm, needs to load it properly.

For every 1minute.
 */1 * * * * cd /home/user/application_path && /home/user/.rvm/bin/rvm use ruby-1.9.2-p136 rake reminder_email >> /home/user/crontab_errors.txt


For dayily
0 0 * * * cd /home/user/application_path && /home/user/.rvm/bin/rvm use ruby-1.9.2-p136 rake reminder_email >> /home/user/crontab_errors.txt

No comments:

Post a Comment