node-cron
node-cron copied to clipboard
.stop() is not working for real time
I have set up a cron job for a specific date and time, but when I call job.stop() on it, it is still executed.
Can you provide a base sample that replicates what you're seeing? We have tests that use the job.stop() functionality so I'd be surprised if this wasn't working. But, I'm happy to take a look.
This is how I am using it:
const job = new CronJob({
cronTime: new Date(req.body.dateTime),
onTick: async () => {},
start: false,
timeZone: timeZoneName,
})