Reputation: 12495
I'm just wondering, in a Ruby on Rails 3 application, if I want to send users an email notification once per day, rather than with every notification, how would I set that up with Action Mailer?
Specifically, would there be a way to run a mailer at, say, 6:00pm every day?
Thanks!
Upvotes: 3
Views: 419
Reputation: 5052
One option is to run a cron job (Linux / Mac servers). This is fairly simple with the Whenever gem which abstracts the actual writing of cron job syntax into a convenient set of ruby methods, which you can programmatically change.
This Railscast goes over it pretty well.
Upvotes: 1