unstale

npm / cron-parser

cron-parser

What changed in cron-parser 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-25.

14 breaking1 security1 deprecations1 new APIs and options2 performance3 behavior and defaults29 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

cron-parser 551 changes

Breaking changes 14

  • Day-of-week L syntax is limited to 0L-7L, while day-of-month L syntax must be bare.

    5.10.5release notes

  • Expressions with L inside a range or step, or combined with #, are rejected.

    5.10.5release notes

  • Crontab entries containing = are no longer treated as variables.

    5.10.4release notes

  • Month names are resolved only in the month field, and weekday names only in the day of week field.

    5.10.4release notes

  • Ranges with more than two parts are rejected.

    5.10.4release notes

  • A timestamp of 0 is treated as the Unix epoch rather than as a missing date.

    5.10.4release notes

  • Values for days the month does not have are dropped.

    5.8.0release notes

  • A standalone L in the day-of-week field is now rejected during construction.

    5.7.0release notes

  • Unsatisfiable expressions now throw instead of returning a bogus date because the iteration loop limit is enforced.

    5.7.0release notes

  • Crontab file parsing is now handled by a standalone CronFileParser class rather than CronParser.

    5.0.0release notes

  • Now returns a readonly CronFieldsCollection instance instead of a regular array; use CronFieldsCollection.from to modify the underlying data structure.

    5.0.0release notes

  • The minimum supported Node.js version is now >= 18.

    5.0.0release notes

  • The minimum supported TypeScript version is now >= 5.

    5.0.0release notes

  • The utc option flag was removed; pass in the UTC timezone instead.

    5.0.0release notes

Security 1

  • Bounds expression length and hashed step expansion at parse time.

    5.10.2release notes

Deprecations 1

  • The npm-published 5.6.2 package is deprecated because it shipped the 5.6.1 source tree; use 5.7.0 instead.

    5.6.2release notes

New APIs and options 1

  • Evaluates whether a given date matches the cron pattern.

    5.0.0release notes

Performance 2

  • CronExpression iteration is faster.

    5.5.0release notes

  • Performance improves by around 20–30% on average, depending on pattern complexity.

    5.0.0release notes

Behavior and default changes 3

  • Crontab entries and predefined expressions now use own keys.

    5.10.3release notes

  • String dates now accept the RFC 850 and asctime HTTP date formats.

    5.10.3release notes

  • Day fields that cover their whole range are kept out of the wildcard form.

    5.8.0release notes

Fixes and other changes 29

  • Only whitelisted characters are allowed around an H token.

    5.10.6release notes

  • Rejects a wildcard when it is part of a larger value.

    5.10.5release notes

  • Rejects a day of month that is unavailable in every listed month.

    5.10.5release notes

  • A day is no longer skipped when a DST change removes its midnight hour.

    5.10.5release notes

  • Only quotes around a crontab variable value are removed.

    5.10.4release notes

  • Reset restores the initial date.

    5.10.4release notes

  • Crontab entries that start with a nickname are parsed.

    5.10.4release notes

  • When day-of-month is unrestricted, parsing skips months with no scheduled occurrences.

    5.10.3release notes

  • Preserves crontab fields separated by whitespace when parsing expressions.

    5.10.2release notes

  • Rejects duplicate zero values during field validation.

    5.10.1release notes

  • Bounds field value expansion at parse time.

    5.10.1release notes

  • Short expressions are padded from the leading field slot.

    5.10.0release notes

  • DST transitions wider than one hour are now compensated for.

    5.9.0release notes

  • A hashed step wider than its range no longer empties the field.

    5.9.0release notes

  • Stringifying stepped fields now keeps explicit range bounds.

    5.9.0release notes

  • The current date is rounded to whole seconds so occurrences on the end date are returned.

    5.8.0release notes

  • A day-of-week step no longer adds Sunday when it never reaches 7.

    5.8.0release notes

  • The CronField constructor now copies the values array rather than reusing it.

    5.7.0release notes

  • A matching day of month is no longer dropped when the day of week uses an nth (#) occurrence.

    5.7.0release notes

  • Fixes CronDate throwing on .bind in bundled and CDN builds.

    5.6.1release notes

  • Does not reject an out-of-range day of month when the day of week is restricted.

    5.6.1release notes

  • Handles DST gaps correctly and prevents iteration from stopping prematurely.

    5.6.1release notes

  • Fixes handling of the ES6 iterator done flag, affecting iteration behavior.

    5.6.0release notes

  • Stops the hour-step loop early on spring-forward DST days to prevent skipping a day.

    5.6.0release notes

  • Fixes parsing of repeat ranges in CronExpressionParser.

    5.6.0release notes

  • CronExpression.reset() now preserves the timezone.

    5.6.0release notes

  • Fixed handling when the range is explicitly set and no wildcard is used.

    5.0.0release notes

  • Fixed cases where range and repeat field expressions produced invalid intervals.

    5.0.0release notes

  • Improved repeat serialization for stringification.

    5.0.0release notes