node-cron icon indicating copy to clipboard operation
node-cron copied to clipboard

node-cron destroy() is not a function

Open whitesimian opened this issue 4 years ago • 3 comments

let test = cron.schedule('*/1 * * * * *', () => {
       console.log('Message node-cron')
})
test.destroy()
TypeError: test.destroy is not a function

In the documentation it's listed as a function.

whitesimian avatar Oct 28 '21 22:10 whitesimian

@whitesimian 289 Looks like the documentation needs to be updated.

FTheron avatar Nov 02 '21 12:11 FTheron

how does one remove a job ? .destroy() is not a function.. .stop does stop a job but it persists .getTasks() shows it indefinitely?

movingelectrons avatar Dec 15 '21 17:12 movingelectrons

how does one remove a job ?

.destroy() works fine in the node-cron version 2.0.3

whitesimian avatar Dec 22 '21 17:12 whitesimian