Pausing and resuming Feature
Author: ashishpatel1992Created Feb 21, 2018Updated Oct 14, 2024
We have a feature to cancel and reschedule. But it doesn't have feature to pause the scheduler and resume it when a certain condition is met. I think maybe something like
var j = schedule.scheduleJob('*/15 * * * * *', () => {
/* Code */
});
j.pause();
j.resume()j.pause() pausing scheduler will no longer execude inside the code block j.resume() will resume the scheduler and will execute the code inside it when the cron time condition is met.
Any ideas?
Source: node-schedule/node-schedule