3 ms·
Off the top of my head, a cron scheduler for a server that reads from a database and sets a timeout upon boot. Every time the server is reboot the timeouts are
by keithwhor 2y ago
Off the top of my head, a cron scheduler for a server that reads from a database and sets a timeout upon boot. Every time the server is reboot the timeouts are reinitialized (fail safe in case of downtime). If upon boot there’s a timeout > 25 days it’ll get executed immediately which is not the behavior you want.
- skykooler 2y agoWhy would you do that in JS rather than just using cron for it?
- efilife 2y agoIt can be quicker since you are in the environment already and you are sure that they will activate only when your program is running
- hinkley 2y agoThis should be an interval with a lookup. Every five seconds check for due dates sooner than 10 seconds from now and schedule them. The longer a delay the higher the odds the process exits without finishing the work.