In my rails application, users can subscribe to some events. I'd like to send a mail to the user 24 hours before the begining of the the event.
I'm not sure how to implement that. A rake task ? Is there some gems or some best practices to follow ?
Thanks!
EDIT:
I guess that my cron must be run every minute to get each event that starts in 24 hours. But if the cron stops, or it takes more than a minute, I can't skip some emails. In the other way, how can I be sure I'm not sending the same email twice ?