I am using RVM environment. RUby version : 2.1.2 rails : 4.1.1
schedule.rb :
every 1.minute do
runner "note.send_mail"
end
I used whenever --update-crontab
to update the cron tab.
when I check the jobs using crontab -l
it shows up as below with no proper time set up.
and the cron job does not work.
* * * * * /bin/bash -l -c 'cd /Desktop/folder1/blog2 && bin/rails runner -e production '\''note.send_mail'\'''
Can some one help me out fix this. Thanks!
Go to your
~/.rvmrc
file and add the following:Then
whenever --update-crontab
again. According to the README of whenever:If that doesn't work for you, try other solutions mentioned in this page: RVM-Notes.
You could define a custom runner that loads rvm on the command line, like
Replace
2.0@gemset
with your desired ruby version and gemset.Could be that
/etc/profile.d/rvm.sh
is something else in your environment too.