Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Something went wrong. It took over five seconds to find the next execution time for the cron job. #684

Closed
allantrigo opened this issue Aug 3, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@allantrigo
Copy link

We are having a problem when trying to run a cron that runs every hour.

Between 1 to 4 AM it will try to run and give the following error:

app/node_modules/@nestjs/schedule/node_modules/cron/lib/time.js:272
					throw new Error(
					^
Error: Something went wrong. It took over five seconds to find the next execution time for the cron job.
							Please refer to the canonical issue (https://github.com/kelektiv/node-cron/issues/467) and provide the following string if you would like to help debug:
							Time Zone: "" - Cron String: 0 0 * * * * - UTC offset: -180
							- current Date: 2023-08-03T01:52:10.474-03:00
    at CT._getNextDateFrom (/usr/src/app/node_modules/@nestjs/schedule/node_modules/cron/lib/time.js:272:12)
    at CT.sendAt (/usr/src/app/node_modules/@nestjs/schedule/node_modules/cron/lib/time.js:185:17)
    at CT.getTimeout (/usr/src/app/node_modules/@nestjs/schedule/node_modules/cron/lib/time.js:202:29)
    at CJ.start (/usr/src/app/node_modules/@nestjs/schedule/node_modules/cron/lib/job.js:119:31)
    at Timeout.callbackWrapper [as _onTimeout] (/usr/src/app/node_modules/@nestjs/schedule/node_modules/cron/lib/job.js:172:11)
    at listOnTimeout (node:internal/timers:564:17)
    at process.processTimers (node:internal/timers:507:7)
Node.js v18.10.0

To further the informations, the time the server is running on is GMT-3.

@intcreator
Copy link
Collaborator

please upgrade to the latest version of cron. if you still have issues, see #467

@sheerlox sheerlox closed this as completed Aug 9, 2023
@sheerlox sheerlox added the duplicate This issue or pull request already exists label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants