npm / croner
croner
What changed in croner 5 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
21 breaking9 new APIs and options2 performance1 behavior and defaults2 tooling17 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcroner 1134 changes
Breaking changes 12
Malformed patterns that previously had trailing characters ignored or names replaced within other text now throw; valid patterns are unaffected.
Counts elapsed time rather than wall-clock time, so DST changes no longer shorten or stretch the interval.
Without a reference, counts from now including milliseconds, so a call inside a callback returns the run that just started. With interval, returns only runs at least interval seconds before the reference.
Question marks in day-of-month or day-of-week now behave like *.
Run-query methods return actual shifted run times, and startAt and stopAt apply to the shifted run time.
Fixed-time jobs in a spring-forward gap run at the first valid time after it; interval jobs run on both occurrences of a repeated time, while fixed-time jobs run once at the first occurrence.
Patterns that can never match return null or an empty list instead of throwing.
Strings retain milliseconds on jobs without a named timezone, and one-off dates later in the same second as startAt can run.
Returns when the previous run started rather than when it finished.
A pattern match exactly at startAt now runs; this change does not apply when interval is set.
ISO 8601 strings are read in the job's timezone rather than system local time.
ISO 8601 strings and Date-based startAt values are interpreted using the job's utcOffset rather than system local time.
New APIs and options 6
Adds an option to select which jobs are fixed-time jobs for DST handling. The no-wildcard rule treats jobs without wildcards or steps in seconds, minutes and hours as fixed-time jobs.
Allows date-based jobs scheduled more than 1 second in the past to fire immediately.
Exports CatchCallbackFn from the source entry point (JSR).
Exports the stateful iterator returned by enumerate().
Exports CronMode from the source entry point (JSR).
Exports ProtectCallbackFn from the source entry point (JSR).
Performance 2
Creating a job is 55–64% faster.
Instances are cached per timezone, making timezone-aware scheduling noticeably faster.
Behavior and default changes 1
A one-off job dated up to 1 second in the past fires immediately; older dates require allowPast: true.
Fixes and other changes 13
Years 1–99 are preserved instead of being interpreted as 1901–1999, including weekday modifiers, leap days, local dates and timezone conversion.
A catch callback returning a rejected promise no longer causes an unhandled rejection; the callback is still not awaited.
Matching a day past the end of a month no longer skips valid runs when the two conditions use OR logic.
Near year 1 or year 9999, uses the year in the job's timezone rather than UTC when determining the year.
Using LW in a day-of-month list still throws, but the error now correctly says LW cannot be in a list.
String references in named timezones retain milliseconds when calculating the time until the next run.
Backward searches no longer skip nearest weekday days that fall after the highest plain day-of-month in the pattern.
Stops searching at year 1, the first supported year, avoiding lengthy searches into year 0 and results in that year.
With alternativeWeekdays enabled, @weekly now runs on Sundays instead of throwing a RangeError.
Negative timer delays are clamped to 0, preventing TimeoutNegativeWarning.
No longer goes backwards or repeats times around a DST spring forward.
Scheduling recovers after system clock steps forward or backward instead of silently skipping occurrences or disagreeing with timer targets.
Stepping with a wildcard in the year field no longer raises RangeError; */2 matches even years.
croner 97 changes
Breaking changes 5
Cron must now be instantiated with new; calling Cron(/*...*/) without new is no longer supported.
The minified distribution file is now named croner.js instead of croner.min.js.
The default export is removed; import or require the named Cron export instead.
Typings move from /types to /dist, so consumers relying on the old typings location may need to update references.
The JSR module exposes only the /src directory.
Fixes and other changes 2
Fixed an issue that caused these crons to fail with a maximum call stack exceeded error.
Types are now supported when using the ES module via jsr.io.
croner 82 changes
Breaking changes 1
Croner 8.x requires Node.js 18.0 or higher; projects using Node.js 16 or lower should stay on Croner 7.x.
Fixes and other changes 1
Fixes an issue that prevented AKDT timezones from triggering.
croner 72 changes
Breaking changes 1
In the day-of-week field, L must be used with # as SUN#L; the former LSUN and SUNL expressions are no longer valid.
New APIs and options 1
Cron patterns can use # as an nth weekday specifier, such as 5#2 for the second Friday of every month.
croner 65 changes
Breaking changes 1
Method names were refactored, including next() to nextRun(); update code that uses the old method name.
New APIs and options 2
Cron patterns can use L to specify the last weekday of the month.
A method was added to manually trigger a run.
Tooling 2
CommonJS and UMD are now separate builds.
Separate CommonJS typings were added to support node-next module resolution.
croner 52 changes
Breaking changes 1
The default mode changes to legacy mode.
Fixes and other changes 1
Timezone and DST handling is improved.