Node-cron - Red crashed, does it need a bump in package.json?

#1

I recently noticed that the node-red service restarted on me. I know when I bounce the service or the box.

See this issue 408.

Node-red package.json is at 1.5.0. ...should this be bumped to 1.7.0?

I think I caught an edge case as reported.

Thanks.

Mar  9 02:55:00 myPi512 Node-RED[5459]: 9 Mar 02:55:00 - [red] Uncaught Exception:
Mar  9 02:55:00 myPi512 Node-RED[5459]: 9 Mar 02:55:00 - Error: Something went wrong. cron reached maximum iterations.
Mar  9 02:55:00 myPi512 Node-RED[5459]: Please open an  issue (https://github.com/kelektiv/node-cron/issues/new) and provide the following string
Mar  9 02:55:00 myPi512 Node-RED[5459]: Time Zone: "" - Cron String: 0 55 2 * * * - UTC offset: -04:00 - current Date: Sat Mar 09 2019 02:55:00 GMT-0500
Mar  9 02:55:00 myPi512 Node-RED[5459]: at CronTime._getNextDateFrom (/usr/lib/node_modules/node-red/node_modules/cron/lib/cron.js:243:12)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at CronTime.sendAt (/usr/lib/node_modules/node-red/node_modules/cron/lib/cron.js:151:17)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at CronTime.getTimeout (/usr/lib/node_modules/node-red/node_modules/cron/lib/cron.js:170:29)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at CronJob.start (/usr/lib/node_modules/node-red/node_modules/cron/lib/cron.js:561:31)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at Timeout.callbackWrapper [as _onTimeout] (/usr/lib/node_modules/node-red/node_modules/cron/lib/cron.js:613:29)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at ontimeout (timers.js:498:11)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at tryOnTimeout (timers.js:323:5)
Mar  9 02:55:00 myPi512 Node-RED[5459]: at Timer.listOnTimeout (timers.js:290:5)
Mar  9 02:55:00 myPi512 systemd[1]: nodered.service: main process exited, code=exited, status=1/FAILURE
Mar  9 02:55:00 myPi512 systemd[1]: Unit nodered.service entered failed state.
Mar  9 02:55:00 myPi512 systemd[1]: nodered.service holdoff time over, scheduling restart.
Mar  9 02:55:00 myPi512 systemd[1]: Stopping Node-RED graphical event wiring tool...
Mar  9 02:55:00 myPi512 systemd[1]: Starting Node-RED graphical event wiring tool...
Mar  9 02:55:00 myPi512 systemd[1]: Started Node-RED graphical event wiring tool.
Mar  9 02:55:10 myPi512 Node-RED[24328]: 9 Mar 02:55:10 - [info]
Mar  9 02:55:10 myPi512 Node-RED[24328]: Welcome to Node-RED
Mar  9 02:55:10 myPi512 Node-RED[24328]: ===================
Mar  9 02:55:10 myPi512 Node-RED[24328]: 9 Mar 02:55:10 - [info] Node-RED version: v0.19.5
Mar  9 02:55:10 myPi512 Node-RED[24328]: 9 Mar 02:55:10 - [info] Node.js  version: v8.12.0
Mar  9 02:55:10 myPi512 Node-RED[24328]: 9 Mar 02:55:10 - [info] Linux 4.9.35+ arm LE
Mar  9 02:55:13 myPi512 Node-RED[24328]: 9 Mar 02:55:13 - [info] Loading palette nodes
Mar  9 02:55:37 myPi512 Node-RED[24328]: 9 Mar 02:55:37 - [info] Dashboard version 2.14.0 started at /ui
Mar  9 02:55:39 myPi512 Node-RED[24328]: 9 Mar 02:55:39 - [info] Settings file  : /home/pi/.node-red/settings.js
#2

Which node-red node is pulling in node-cron? I do not seem to have it installed in my node-red.

#3

The module is cron and it's used by the Inject node.
The imminent 0.20 release pulls it up to the latest.

#4

Ah yes, it is the module cron, not node-cron. Confusing as there is, in fact, also a module node-cron.