I am trying to run a Rake task using crontab in Rails 3.0.9(using RVM), But it is not working.
But when i running in the console it works fine
My Rake Task
namespace :alert do
desc "create some reminder notification"
task :send_reminder => :environment do
p "my task goes here ----"
end
end
My cron task
*/1 * * * * cd /home/anu-karthik/Documents/billguru/ && /home/anu-karthik/.rvm/gems/ruby-1.9.2-p0/bin/rake alert:send_reminder >/home/anu-karthik/alert.out
But I didn't found any log entry in "alert.out" file
also I have tried with following method
*/1 * * * * cd /home/anu-karthik/Documents/billguru/ && rake alert:send_reminder >/home/anu-karthik/alert.out
now output is (in /home/anu-karthik/Documents/billguru)
I think it is the problem with RVM. How do I solve this issue? Thanks in advance