I used when ever gem to send mails every day but it's not sending.I am using amazon linux ec2 instance.please look at my code once.
schedule.rb:
every 5.minutes do runner "Listings.today_expired_spaces" end
Listings.rb:(model-file)
def today_expired_spaces @list=List.find_by_date(Date.today) UserMailer.today_expired_list(@list).deliver
end
In production: after running these commands I am getting responses like this 1.whenever -w
[write] crontab file written
2.whenever -i [write] crontab file updated
3.whenever
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /home/ubuntu/my_server && bundle exec script/rails runner -e production '\''Spaces.today_expired_spaces'\'''
[message] Above is your schedule file converted to cron syntax; your crontab file was not updated.
[message] Run `whenever --help' for more options.
please provide solution to this.
Aucun commentaire:
Enregistrer un commentaire