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

Error: Something went wrong. cron reached maximum iterations.

Open yuis-ice opened this issue 4 years ago • 1 comments

version: node, v13.10.1 cron, ^1.8.2

error:

/home/yuis/pg/playwright/node_modules/cron/lib/cron.js:235
                                        throw new Error(
                                        ^

Error: Something went wrong. cron reached maximum iterations.
                                                Please open an  issue (https://github.com/kelektiv/node-cron/issues/new) and provide the following string
                                                Time Zone: "" - Cron String: 0 0 0,4,8,12,16,20 * * * - UTC offset: +09:00 - current Date: Thu Jan 21 2021 04:00:26 GMT+0900
    at CronTime._getNextDateFrom (/home/yuis/pg/playwright/node_modules/cron/lib/cron.js:235:12)
    at CronTime.sendAt (/home/yuis/pg/playwright/node_modules/cron/lib/cron.js:156:17)
    at CronTime.getTimeout (/home/yuis/pg/playwright/node_modules/cron/lib/cron.js:175:29)
    at CronJob.start (/home/yuis/pg/playwright/node_modules/cron/lib/cron.js:613:31)
    at Timeout.callbackWrapper [as _onTimeout] (/home/yuis/pg/playwright/node_modules/cron/lib/cron.js:665:29)  
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

part of the code:

(new CronJob('0 0 */4 * * *', async function() {
  console.log('[every 4 hours] Job fired:', new Date() );

	await exec(` kill -9 $(jobs -p) ; time ./someScript.js --timeframe 240 `, (error, stdout, stderr) => {
		if ( error ){ console.log(error) }
		if ( stdout ){ console.log(stdout) }
		if ( stderr ){ console.log(stderr) }
	});

  // console.log('Job Completed:', new Date() );
})).start() ;

yuis-ice avatar Jan 21 '21 03:01 yuis-ice

I'm also experiencing this issue, just today.

MelodicCrypter avatar Feb 03 '21 11:02 MelodicCrypter