I'm using the lib cron-job-manager
to manage my cron because i'm running multiple crons in my app but i have an issue when i want to update the specific cron i do it like this:
manager.update(alertData.id.toString(), cronFinal)
But it's not working when i see the function it take this as arguments:
update(...args: any): void
The documentation says
You may want to change the task, time or both of any job during execution. You can do so using the update function
manager.update('key', '0 15 3,5,9,14,18,20 * * *', () => {// do this instead on this new schedule
});
manager.update('key', () => { // do this instead
});
manager.update('key', '0 15 3,5,9,14,18,20 * * *') // do it on this schedule instead.
The error i have is this one;
error updating tab: 33 - Cannot read property 'running' of undefined
33 corresponding to the id.toString()
i'm using
Can someone tell me what i am doing wrong pls ?
Thanks by advance :D