I have a shell script (/home/user/send_report.sh) that runs my rake task:
cd /home/user/rails/app
/home/user/.rvm/gems/ruby-1.9.2-p136/bin/rake report:send
When I run it in console sh /home/user/send_report.sh it works properly.
I am trying to make a cron task with my script: */10 * * * * sh /home/user/send_report.sh, but nothing happens! Rake task should send mail, but this does not happen.
Content of /var/log/cron.log:
Jun 2 21:40:01 ubuntu CRON[1253]: (user) CMD (sh /home/user/send_report.sh)
Jun 2 21:40:01 ubuntu CRON[1251]: (user) MAIL (mailed 240 bytes of output but got status 0x0001#012)
Please, help me to get the working rake script with crontab.
Problem was that RVM single-user installation doesn’t supports cron tasks. Installed RVM as multi-user and crontab worked properly.