I need to schedule a mail every 6 hours whenever the user's balance falls below a threshold. I'm trying to use node-cron package but everytime my server restarts, I'm sure it will start rescheduling and I don't want that to happen.
Asked
Active
Viewed 30 times
0
-
1use custom/static 6 hour gaps times for cronjob to run – Dhaval Darji May 06 '21 at 11:56
-
You can persist the current schedule somewhere outside of your app. You can take a look at packages like [this one](https://www.npmjs.com/package/handy-storage). – Georgi B. Nikolov May 06 '21 at 11:57