NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4548 most downloaded on npm
Job scheduling for Node.js with overlap prevention, distributed coordination, and background tasks. Zero dependencies, written in TypeScript.
Last release 3 months ago
05 Jul 2026
Release timing varies
gaps range from 9 days to 1.5 years
Some releases are documented
notes for 18 of 39 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
45 releases · first in 2016
add cron.shutdown(timeout?) for graceful process teardown
One column per quarter.
`lastRun()` introspection getter on ScheduledTask: returns { date, result } after a successful execution, { date, error } after a failed one, or null
lastRun() introspection getter on ScheduledTask: returns { date, result } after a successful execution, { date, error } after a failed one, or null before the first run.<weekday>#<nth> (nth weekday of the month, e.g. 1#1 for the first Monday) and <weekday>L (last weekday of the month, e.g. 5L for the last Friday).Intl.DateTimeFormat instances per timezone instead of rebuilding on every call.TimeMatcher instead of re-parsing in MatcherWalker.crypto.randomBytes with crypto.randomUUID for internal ID generation.setTimeout jitter wrapper when maxRandomDelay is zero.should schedule a task test: poll for the first execution instead of asserting an exact count after a fixed sleep.interprete to interpret and appendSeccondExpression to appendSecondExpression.lastRun() introspection getter on ScheduledTask: returns { date, result } after
a successful execution, { date, error } after a failed one, or null before the first
run. ([#557])<weekday>#<nth> (nth weekday of the month, e.g.
1#1 for the first Monday) and <weekday>L (last weekday of the month, e.g. 5L
for the last Friday). ([#560])Intl.DateTimeFormat instances per timezone instead of rebuilding on every
call. ([#561])TimeMatcher instead of re-parsing in
MatcherWalker. ([#562])crypto.randomBytes with crypto.randomUUID for internal ID
generation. ([#564])setTimeout jitter wrapper when maxRandomDelay is zero. ([#565])should schedule a task test: poll for the first execution instead of
asserting an exact count after a fixed sleep.interprete to interpret and
appendSeccondExpression to appendSecondExpression. ([#567])Renamed the distributedTtl task option to `distributedLease` (same meaning: the safety lease, in ms, for lease-based run coordinators). distributedTtl
Patch release.
distributedTtl task option to distributedLease (same meaning: the safety lease, in ms, for lease-based run coordinators). distributedTtl was the only abbreviation in the options API and shipped just days ago in 4.4.0, so it's removed without an alias. If you adopted distributedTtl from 4.4.0, rename it to distributedLease. (#551)Full Changelog: https://github.com/node-cron/node-cron/compare/v4.4.0...v4.4.1
distributedTtl option to distributedLease (same meaning:
the safety lease, in ms, for lease-based coordinators). The old name was the
only abbreviation in the options API; the new one groups with distributed.
distributedTtl was introduced in 4.4.0 and is removed without an alias.Distributed run coordination — opt-in distributed: true runs a task on a single instance per fire across a fleet (the #477 use case). Ships a built-in
distributed: true runs a task on a single instance per fire across a fleet (the #477 use case). Ships a built-in NODE_CRON_RUN env-var default (one designated runner, no dependencies) and a pluggable RunCoordinator (via setRunCoordinator, or the per-task runCoordinator option) for high-availability, per-fire coordination (e.g. a Redis lock). Adds the distributedTtl option and an execution:skipped event carrying a reason ('not-elected' | 'coordinator-error'). Works for inline and background tasks. (#549, closes #477)ScheduledTask: getNextRuns(n) (preview the next N run times), match(date), msToNext(), isBusy(), runsLeft() and getPattern(). (#547)cron.parse(expression) and cron.validateDetailed(expression) — decompose an expression into its fields, or get every field-level problem (without throwing) for tooling and richer error messages. (#548)getNextMatch no longer scans every time of day on a day that matches the day-of-month but not the weekday. A dense expression constrained by both (e.g. * * * 15 * 1) could take minutes to resolve; it is now instant. (#542)milisecond → millisecond spelling and the convertion/ → conversion/ directory name. (#543)parse/validateDetailed, at nodecron.com.Full Changelog: https://github.com/node-cron/node-cron/compare/v4.3.0...v4.4.0
`L` (last day of month) in the day-of-month field — e.g. 0 0 12 L * *, leap-year aware, and combinable with explicit days (15,L). (#396, closes #147 —
L (last day of month) in the day-of-month field — e.g. 0 0 12 L * *, leap-year aware, and combinable with explicit days (15,L). (#396, closes #147 — thanks @antonidasyang)missedExecutionTolerance option (ms, default 1000): a heartbeat that wakes a little late still runs its slot instead of being reported as missed. Always capped to the gap to the next slot. (#534, closes #485)startTimeout option for background tasks (ms, default 5000). (#535)getNextMatch for correctness around DST: no more ~1-year overshoot when a daily time falls in the spring-forward gap. (#533, closes #518)getTasks/getTask. (#536, #537)missedExecutionTolerance defaults to 1000ms, so a scheduled run that wakes up to ~1s late now executes instead of emitting execution:missed. This is a bug-fix improvement, not an API break.Full Changelog: https://github.com/node-cron/node-cron/compare/v4.2.1...v4.3.0
L (last day of month) in the day-of-month field — e.g. 0 0 12 L * *,
leap-year aware and combinable with explicit days (15,L). ([#147])missedExecutionTolerance option (ms, default 1000): a heartbeat that
wakes a little late still runs its slot instead of being reported as missed.
Always capped to the gap to the next slot, so it can never run a slot twice.
([#485])startTimeout option for background tasks (ms, default 5000). ([#535])getNextMatch: no more ~1-year overshoot when a daily time
falls in the spring-forward gap. ([#518])>= 20.11); tested on Node
20, 22 and 24.Behavior note:
missedExecutionTolerancedefaults to1000ms, so a scheduled run that wakes up to ~1s late now executes instead of emittingexecution:missed. This is a bug-fix improvement, not an API break.
ESM/CJS interop and task-file import on Windows.
getTasks() and getTask(id) to inspect the task registry.
getTasks() and getTask(id) to inspect the task registry.Overlap prevention (noOverlap).
noOverlap).Jitter via the maxRandomDelay option.
maxRandomDelay option.createID compatibility with older Node versions (e.g. Node 16).Dropped timeZoneName from the localized-time conversion (DST handling).
timeZoneName from the localized-time conversion (DST handling).getNextMatch edge cases, including a time parsed as 24:00.
getNextMatch edge cases, including a time parsed as 24:00.### Added - Missing task options.
GMT offset on Node 16 and the crypto import.
crypto import.Background task file resolution path.
Cap the heartbeat delay so long intervals don't overflow setTimeout.
setTimeout.Dual CommonJS/ESM build output.
add option recoverMissedExecutions in readme by @theusmoreira in https://github.com/node-cron/node-cron/pull/332
Full Changelog: https://github.com/node-cron/node-cron/compare/v3.0.3...v4.0.0
Full rewrite in TypeScript with a new, event-driven API: lifecycle events,
background tasks (run a task file in a forked process), createTask for tasks
that start stopped, per-task logger, and a dual ESM/CJS build. The legacy
scheduled/runOnInit options were removed and several event names changed.
See the migration guide.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Added timezone support using tz-offset;
getStatus to retrive the task current status;scheduled;Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →