Reputation: 3969
I want to send messages to users at a specific time (like 15 minutes after each event that a user puts in). Users can schedule events for any time/any day. Why should I use a daemon instead of a cron job? What are the pros and crons for cron job vs daemon?
Upvotes: 3
Views: 3614
Reputation: 2130
A daemon is for process that you wish to be constantly running. A wsgi server for example where incoming communications could come at anytime. A cron job is for batch jobs that should occur with some regular frequency.
This sounds like a cron job. You could set up a timer or a while loop to constantly run and dispatch messages every hour(what ever time you choose). however it is added complexity you do not need. make a script that runs in batch and call it at the regular interval you need.
Upvotes: 2