I am using whenever gem and I have written a rake task to send emails. In my schedule.rb when I use this code
set :environment, "development"
set :output, {:error => "log/cron_error_log.log",
:standard =>"log/cron_log.log"}
every :day, :at => '11:20pm' do
rake "send_daily_reports"
end
I am not getting mails but when i use something like this
every 5.minutes do
rake "send_daily_reports"
end
I get mails for 5 every minutes.
I tried replacing
every :day
with
every 1.day
but still its not working. I have followed every step. When I pull the code into the cloud I use the command
whenever -w
to update the crontab and then restart the server. I thought that there might be an issue with the linux system time.But when i used the date command in the terminal I got the correct date and time.I also checked the cron_error log but there are no errors logged. Can anyone please help me out here?