Hacker News new | ask | show | jobs
by imtu80 4611 days ago
I am working on a scheduled reminder (email/SMS service) to send notifications. I've been looking for a scheduling/Cron service for node. There are few I am evaluating. I will consider yours. If I reboot the machine or node server, will it automatically queue up the jobs?
1 comments

So if you reboot the server, you just need to make sure that you call agenda.start() again. This will start the job processor which looks for jobs that have come due in the database and process them. agenda.every('3 minutes', 'job name') is a special case in which it will only schedule that job once (because if you think about it, otherwise every time you ran that line you'd get a new job... This makes it so you can define it in the same file as where you call agenda.start() and not end up defining new versions of those repeating jobs every time the file gets ran). Hope this makes sense/helps.