Search code examples
node.jsmongodbexpressscheduled-tasksnode-cron

node-cron tasks terminated after restart the server


The project in which I am working completely dependent on cronjobs functionality like firebase push notification 1 day before the subscription expires. the problem is when I restart the server all cron jobs are terminated. how can I solve this


Solution

  • Use Agenda.js & Agendash . Npm install agenda agendash Agenda save your jobs in database & triggered even you reboot your server . Agendash give you a dashboard for monitor or test your schedule jobs