-
Notifications
You must be signed in to change notification settings - Fork 626
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
Getting error date.format is not a function #636
Comments
Same problem here. I'm at version 2.1.0. The crash is in this code here: // hard stop if the current date is after the expected execution
if (Date.now() > timeout) {
throw new 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: ${zone || '""'} - Cron String: ${this} - UTC offset: ${date.format(
'Z'
)} - current Date: ${luxon.DateTime.local().toString()}`
);
} Curious, @tbhaxor , if this happens every time for you or intermittently. For me, I'm getting this intermittently when running my unit tests when I ask for a bunch of next dates. I'll keep investigating. Eric |
i have the same issue it seems, and it's pretty random too
|
This comment was marked as off-topic.
This comment was marked as off-topic.
this is fixed in #630 |
Will there be a 2.2.1 with this fix? |
yeah, working on publishing to NPM. might be a 2.3.0 though since we've changed some heavier stuff as well |
@barisusakli wow, my nodebb forum also broken as of 12h ago with this error. i wonder what happened! this code looks strange 🤨 Lines 262 to 278 in 03f94ad
and #630 doesn't solve anything, it's still gonna throw the error |
@ledlamp #467 is a pretty general error which can have a number of causes. basically any time the CPU lags too much the error can be thrown. this can be due to infinite loops, overloaded systems, etc. honestly we should close that issue and focus on issues that have specific causes. no program is perfect so it's unreasonable to expect that it will absolutely never fail |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Description
I am getting the following error in the version v2.0.0
https://github.com/kelektiv/node-cron/blob/master/lib/time.js#L271
Cron expression I am using
Screenshots
Additional information
No response
The text was updated successfully, but these errors were encountered: