node-cron / node-cron

A simple cron-like job scheduler for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue discovered in v.3.0.0 - but potentialy can come up again

vit100 opened this issue · comments

Observed error
global.scheduledTasks.push is not a function
at Object.save (blah-blah/node-cron/src/storage.js:8:35)
in version 3.0.0 - https://github.com/node-cron/node-cron/blob/v3.0.0/src/storage.js

I see in 3.0.2 it is now Map object now instead of [] as it used to be in 3.0.0, but approach is still same..
line 13: global.scheduledTasks.set(task.options.name, task);

Still can throw exception.