node-cron: cron fails on two servers, approximately same time, without error

I have two aws servers, identical setup: lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic uname -r 4.15.0-1035-aws node --version v8.16.0 cat package.json | grep cron "cron": "^1.7.1",

both have cron running with this code: new CronJob('*/10 * * * * *', procNewBlock, null, true, 'Europe/Berlin');

both stopped running at approximately the same time, the first was running the last time at: May 2 09:05:47 UTC

the second last run was at: May 2 09:06:30 UTC

so far this was the only time that this happend (running for about 1 month now). To me it looks as if some scheduled system task outside of nodejs is killing the crons. But any help greatly appreciated. The nodejs processes did not see any interruption.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

No, not yet. I am still waiting that it happens again so I get more debug info. So far it happened once more, which showed me that: a) it is actually not related to the cron package but some deeper source in nodejs b) it was probably a coincidence that it happend on both servers at the same time

Closing this issue since OP established it wasn’t an issue with the library, but rather with Node.js.

EDIT: leaving the type:bug label even thought it’s not one, so the issue can be found easily in case someone encounters it again in the future.

There was no error shown in logs, I’ll try simple cron job on same machine and share more details.