-3

I'm writing an application in node.js and need some sort of job scheduler like cron. I can't use cron because it will cause issues if the job is executed while the process is offline. I've tried node-schedule but it isn't working and the handle always returns null for me no matter if I use a valid date or not. Thanks in advance.

1 Answers1

0

In my projects i work with node-cron:
https://www.npmjs.com/package/node-cron

var cron = require('node-cron');
 
cron.schedule('* * * * *', () => {
  console.log('running a task every minute');
});
Marcus Yoda
  • 243
  • 1
  • 8
  • Node-cron is nice, unfortunately we (at our company) ran into a bug https://github.com/kelektiv/node-cron/issues/232 that makes it a no-go for production apps. – YohjiNakamoto May 24 '22 at 08:44