Update dependency node-cron to v4 #22

Open
renovate wants to merge 1 commit from renovate/node-cron-4.x into main
Collaborator

This PR contains the following updates:

Package Change Age Confidence
node-cron (source) ^3.0.3^4.0.0 age confidence

Release Notes

node-cron/node-cron (node-cron)

v4.6.0

Compare Source

Added
Fixed
  • background task state transition on stop/destroy without fork (#​584) (9dbc6de)
  • clear jitter timeout on runner stop (#​583) (28b8146)
  • CommonJS type resolution (#​608) (ee9d294)
  • correct falied->failed typo in daemon task error log (#​594) (66c6961)
  • correct shutdown listener typing that broke the build (#​595) (7aac3ad)
  • correlate execute() by id, isolate event hooks, and stop counting manual runs toward maxExecutions (#​607) (0f039a9)
  • daemon serialized task state with wrong field name (#​587) (688d465)
  • expand inverted ranges with wrap-around instead of silently swapping (#​602) (a10ae53)
  • harden cron.shutdown() teardown (#​598) (a0b0d1f)
  • kill orphan child process on background task stop/destroy timeout (#​582) (8179e10)
  • make concurrent background start() await the daemon and time out coordinator lookups (#​605) (446f03a)
  • make lifecycle calls on a destroyed task safe no-ops (#​600) (7fa9795)
  • prevent double destroy on registry remove (#​585) (8ae9f06)
  • release-please: match existing v-prefixed tags (#​575) (e43c152)
  • runner promise bugs that could hang scheduling or crash process (#​581) (0ae62be)
  • unref the IPC channel so background tasks let the process exit (#​599) (534e593)
  • validate the cron expression when scheduling a task (#​603) (196e6cd)
  • validate() consistency and multi-asterisk expansion (#​606) (8cf41c4)
  • weekday 7-to-0 conversion corrupting ranges (#​580) (c8a3943)
Changed
  • replace chai and sinon with native vitest assertions (#​590) (d29d07a)

v4.5.0

Compare Source

Added
  • 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])
  • Extended day-of-week tokens: <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])
Performance
  • Cache Intl.DateTimeFormat instances per timezone instead of rebuilding on every
    call. ([#​561])
  • Parse the cron expression once per TimeMatcher instead of re-parsing in
    MatcherWalker. ([#​562])
  • Compute the GMT offset lazily (only when formatting ISO strings, not during the
    next-run search). ([#​563])
  • Replace crypto.randomBytes with crypto.randomUUID for internal ID
    generation. ([#​564])
  • Skip setTimeout jitter wrapper when maxRandomDelay is zero. ([#​565])
  • Bundle dist into flat files instead of preserving the module tree (reduces import
    time). ([#​566])
Fixed
  • Flaky should schedule a task test: poll for the first execution instead of
    asserting an exact count after a fixed sleep.
Changed
  • Renamed internal functions interprete to interpret and
    appendSeccondExpression to appendSecondExpression. ([#​567])
  • Rewritten README and package metadata to surface scheduling capabilities
    (overlap prevention, distributed coordination, background tasks). ([#​568])

v4.4.1

Compare Source

Changed
  • Renamed the 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.

v4.4.0

Compare Source

Added
  • Task introspection on 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])
  • Distributed run coordination — opt-in distributed: true runs a task on a
    single instance per fire across a fleet. 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])
Fixed
  • 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.
Changed
  • Internal-only cleanups (no public API change): fixed the milisecond
    millisecond spelling and the convertion/conversion/ directory name.

v4.3.0

Compare Source

Added
  • 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])
Fixed
  • DST correctness in getNextMatch: no more ~1-year overshoot when a daily time
    falls in the spring-forward gap. ([#​518])
  • Background task start failures now reject with the real cause (e.g.
    unsupported TypeScript syntax, missing file) instead of an opaque timeout, and
    a failed or timed-out start no longer leaves an orphaned daemon running.
    ([#​484])
  • Long-timer drift no longer produces spurious "missed execution" warnings or
    skipped runs on daily/weekly schedules. ([#​485])
Changed
  • Minimum supported Node.js is now >= 20 (was >= 20.11); tested on Node
    20, 22 and 24.

Behavior note: 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.

v4.2.1

Compare Source

Fixed
  • ESM/CJS interop and task-file import on Windows.

v4.2.0

Compare Source

Added
  • getTasks() and getTask(id) to inspect the task registry.

v4.1.1

Compare Source

Fixed
  • Overlap prevention (noOverlap).

v4.1.0

Compare Source

Added
  • Jitter via the maxRandomDelay option.
Fixed
  • createID compatibility with older Node versions (e.g. Node 16).

v4.0.7

Compare Source

Fixed
  • Dropped timeZoneName from the localized-time conversion (DST handling).

v4.0.6

Compare Source

Fixed
  • getNextMatch edge cases, including a time parsed as 24:00.

v4.0.5

Compare Source

Added
  • Missing task options.

v4.0.4

Compare Source

Fixed
  • GMT offset on Node 16 and the crypto import.

v4.0.3

Compare Source

Fixed
  • Background task file resolution path.

v4.0.2

Compare Source

Fixed
  • Cap the heartbeat delay so long intervals don't overflow setTimeout.

v4.0.1

Compare Source

Fixed
  • Dual CommonJS/ESM build output.

v4.0.0

Compare Source

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.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [node-cron](https://nodecron.com) ([source](https://github.com/node-cron/node-cron)) | [`^3.0.3` → `^4.0.0`](https://renovatebot.com/diffs/npm/node-cron/3.0.3/4.6.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/node-cron/4.6.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/node-cron/3.0.3/4.6.0?slim=true) | --- ### Release Notes <details> <summary>node-cron/node-cron (node-cron)</summary> ### [`v4.6.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#460-2026-07-04) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.5.0...v4.6.0) ##### Added - add cron.shutdown(timeout?) for graceful process teardown ([#&#8203;589](https://github.com/node-cron/node-cron/issues/589)) ([35f1a61](https://github.com/node-cron/node-cron/commit/35f1a61ba7cef987f7ed342489d8d0f0220553b8)) - add unref option for heartbeat timers ([#&#8203;588](https://github.com/node-cron/node-cron/issues/588)) ([35cb140](https://github.com/node-cron/node-cron/commit/35cb140d9c2d790ff295d54fbe82f6eec9b27e33)) - **day-of-month:** Quartz-style W, L-n and ? modifiers ([#&#8203;570](https://github.com/node-cron/node-cron/issues/570)) ([cbe379b](https://github.com/node-cron/node-cron/commit/cbe379bce9d770c84328399dca514bd92a467c18)) - emit task:failed when a background daemon exits unexpectedly ([7bd91d6](https://github.com/node-cron/node-cron/commit/7bd91d62d1472d52f9adbddfddc0c47458623080)) - support cron expression nicknames ([@&#8203;yearly](https://github.com/yearly), [@&#8203;daily](https://github.com/daily), etc.) ([#&#8203;579](https://github.com/node-cron/node-cron/issues/579)) ([6a6e14e](https://github.com/node-cron/node-cron/commit/6a6e14e43ab4ce5c21b52414a17e3e20311bd7bf)) ##### Fixed - background task state transition on stop/destroy without fork ([#&#8203;584](https://github.com/node-cron/node-cron/issues/584)) ([9dbc6de](https://github.com/node-cron/node-cron/commit/9dbc6de269cf5855b0afc037fb4446ef9791d761)) - clear jitter timeout on runner stop ([#&#8203;583](https://github.com/node-cron/node-cron/issues/583)) ([28b8146](https://github.com/node-cron/node-cron/commit/28b8146dd164ea992e1d5a649756b2bba4e062c4)) - CommonJS type resolution ([#&#8203;608](https://github.com/node-cron/node-cron/issues/608)) ([ee9d294](https://github.com/node-cron/node-cron/commit/ee9d294e71e526edffa2a2f902cad71e1f570d44)) - correct falied->failed typo in daemon task error log ([#&#8203;594](https://github.com/node-cron/node-cron/issues/594)) ([66c6961](https://github.com/node-cron/node-cron/commit/66c6961f2140d84cb71b101013abc170977297eb)) - correct shutdown listener typing that broke the build ([#&#8203;595](https://github.com/node-cron/node-cron/issues/595)) ([7aac3ad](https://github.com/node-cron/node-cron/commit/7aac3adc22516faad054f2b3ef7362edf62e20f3)) - correlate execute() by id, isolate event hooks, and stop counting manual runs toward maxExecutions ([#&#8203;607](https://github.com/node-cron/node-cron/issues/607)) ([0f039a9](https://github.com/node-cron/node-cron/commit/0f039a94dcaf6221ea406221b1e7c5eb34a47c4b)) - daemon serialized task state with wrong field name ([#&#8203;587](https://github.com/node-cron/node-cron/issues/587)) ([688d465](https://github.com/node-cron/node-cron/commit/688d465b82889f07f39dfef9170d808c1f40330e)) - expand inverted ranges with wrap-around instead of silently swapping ([#&#8203;602](https://github.com/node-cron/node-cron/issues/602)) ([a10ae53](https://github.com/node-cron/node-cron/commit/a10ae53626f1cc6e426e23266423f5e334a6871e)) - harden cron.shutdown() teardown ([#&#8203;598](https://github.com/node-cron/node-cron/issues/598)) ([a0b0d1f](https://github.com/node-cron/node-cron/commit/a0b0d1ff9313d0f8532130e5fcb873f29f48fd1f)) - kill orphan child process on background task stop/destroy timeout ([#&#8203;582](https://github.com/node-cron/node-cron/issues/582)) ([8179e10](https://github.com/node-cron/node-cron/commit/8179e105a02b91035bce441309c1cda12aaf4c4a)) - make concurrent background start() await the daemon and time out coordinator lookups ([#&#8203;605](https://github.com/node-cron/node-cron/issues/605)) ([446f03a](https://github.com/node-cron/node-cron/commit/446f03ae8f366683c43b186b93bcba5091a00042)) - make lifecycle calls on a destroyed task safe no-ops ([#&#8203;600](https://github.com/node-cron/node-cron/issues/600)) ([7fa9795](https://github.com/node-cron/node-cron/commit/7fa979514f9181aa63b0363cddb2acbf045b1f8c)) - prevent double destroy on registry remove ([#&#8203;585](https://github.com/node-cron/node-cron/issues/585)) ([8ae9f06](https://github.com/node-cron/node-cron/commit/8ae9f06463954754d4958f9eb478aed73e8adc4d)) - **release-please:** match existing v-prefixed tags ([#&#8203;575](https://github.com/node-cron/node-cron/issues/575)) ([e43c152](https://github.com/node-cron/node-cron/commit/e43c152188d993f59a12e3e9e258a695b44ca579)) - runner promise bugs that could hang scheduling or crash process ([#&#8203;581](https://github.com/node-cron/node-cron/issues/581)) ([0ae62be](https://github.com/node-cron/node-cron/commit/0ae62be8b3639762f1b09569cbb66503c940d8e5)) - unref the IPC channel so background tasks let the process exit ([#&#8203;599](https://github.com/node-cron/node-cron/issues/599)) ([534e593](https://github.com/node-cron/node-cron/commit/534e59344c019bc69869bc33e5cdcf1ff8ae1f1e)) - validate the cron expression when scheduling a task ([#&#8203;603](https://github.com/node-cron/node-cron/issues/603)) ([196e6cd](https://github.com/node-cron/node-cron/commit/196e6cd41ac32ab9df56668ac70e1b5232384bb8)) - validate() consistency and multi-asterisk expansion ([#&#8203;606](https://github.com/node-cron/node-cron/issues/606)) ([8cf41c4](https://github.com/node-cron/node-cron/commit/8cf41c436f5b544e32908d6e73b2679e973074e3)) - weekday 7-to-0 conversion corrupting ranges ([#&#8203;580](https://github.com/node-cron/node-cron/issues/580)) ([c8a3943](https://github.com/node-cron/node-cron/commit/c8a3943817cc1338d4f03dbc7ad52fa34d449134)) ##### Changed - replace chai and sinon with native vitest assertions ([#&#8203;590](https://github.com/node-cron/node-cron/issues/590)) ([d29d07a](https://github.com/node-cron/node-cron/commit/d29d07a005911b4ae19ce5a6bb55571018972e1f)) ### [`v4.5.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#450---2026-06-21) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.4.1...v4.5.0) ##### Added - **`lastRun()`** introspection getter on `ScheduledTask`: returns `{ date, result }` after a successful execution, `{ date, error }` after a failed one, or `null` before the first run. (\[[#&#8203;557](https://github.com/node-cron/node-cron/issues/557)]) - **Extended day-of-week tokens**: `<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). (\[[#&#8203;560](https://github.com/node-cron/node-cron/issues/560)]) ##### Performance - Cache `Intl.DateTimeFormat` instances per timezone instead of rebuilding on every call. (\[[#&#8203;561](https://github.com/node-cron/node-cron/issues/561)]) - Parse the cron expression once per `TimeMatcher` instead of re-parsing in `MatcherWalker`. (\[[#&#8203;562](https://github.com/node-cron/node-cron/issues/562)]) - Compute the GMT offset lazily (only when formatting ISO strings, not during the next-run search). (\[[#&#8203;563](https://github.com/node-cron/node-cron/issues/563)]) - Replace `crypto.randomBytes` with `crypto.randomUUID` for internal ID generation. (\[[#&#8203;564](https://github.com/node-cron/node-cron/issues/564)]) - Skip `setTimeout` jitter wrapper when `maxRandomDelay` is zero. (\[[#&#8203;565](https://github.com/node-cron/node-cron/issues/565)]) - Bundle dist into flat files instead of preserving the module tree (reduces import time). (\[[#&#8203;566](https://github.com/node-cron/node-cron/issues/566)]) ##### Fixed - Flaky `should schedule a task` test: poll for the first execution instead of asserting an exact count after a fixed sleep. ##### Changed - Renamed internal functions `interprete` to `interpret` and `appendSeccondExpression` to `appendSecondExpression`. (\[[#&#8203;567](https://github.com/node-cron/node-cron/issues/567)]) - Rewritten README and package metadata to surface scheduling capabilities (overlap prevention, distributed coordination, background tasks). (\[[#&#8203;568](https://github.com/node-cron/node-cron/issues/568)]) ### [`v4.4.1`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#441---2026-06-18) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.4.0...v4.4.1) ##### Changed - Renamed the `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. ### [`v4.4.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#440---2026-06-17) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.3.0...v4.4.0) ##### Added - **Task introspection** on `ScheduledTask`: `getNextRuns(n)` (preview the next N run times), `match(date)`, `msToNext()`, `isBusy()`, `runsLeft()` and `getPattern()`. (\[[#&#8203;547](https://github.com/node-cron/node-cron/issues/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. (\[[#&#8203;548](https://github.com/node-cron/node-cron/issues/548)]) - **Distributed run coordination** — opt-in `distributed: true` runs a task on a single instance per fire across a fleet. 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. (\[[#&#8203;549](https://github.com/node-cron/node-cron/issues/549)]) ##### Fixed - `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. ##### Changed - Internal-only cleanups (no public API change): fixed the `milisecond` → `millisecond` spelling and the `convertion/` → `conversion/` directory name. ### [`v4.3.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#430---2026-06-17) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.2.1...v4.3.0) ##### Added - **`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`). (\[[#&#8203;147](https://github.com/node-cron/node-cron/issues/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. (\[[#&#8203;485](https://github.com/node-cron/node-cron/issues/485)]) - **`startTimeout`** option for background tasks (ms, default `5000`). (\[[#&#8203;535](https://github.com/node-cron/node-cron/issues/535)]) ##### Fixed - DST correctness in `getNextMatch`: no more \~1-year overshoot when a daily time falls in the spring-forward gap. (\[[#&#8203;518](https://github.com/node-cron/node-cron/issues/518)]) - Background task start failures now reject with the **real cause** (e.g. unsupported TypeScript syntax, missing file) instead of an opaque timeout, and a failed or timed-out start no longer leaves an **orphaned daemon** running. (\[[#&#8203;484](https://github.com/node-cron/node-cron/issues/484)]) - Long-timer drift no longer produces spurious "missed execution" warnings or skipped runs on daily/weekly schedules. (\[[#&#8203;485](https://github.com/node-cron/node-cron/issues/485)]) ##### Changed - Minimum supported Node.js is now **>= 20** (was `>= 20.11`); tested on Node 20, 22 and 24. > **Behavior note:** `missedExecutionTolerance` defaults to `1000`ms, 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. ### [`v4.2.1`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#421---2025-07-10) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.2.0...v4.2.1) ##### Fixed - ESM/CJS interop and task-file import on Windows. ### [`v4.2.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#420---2025-06-30) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.1.1...v4.2.0) ##### Added - `getTasks()` and `getTask(id)` to inspect the task registry. ### [`v4.1.1`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#411---2025-06-20) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.1.0...v4.1.1) ##### Fixed - Overlap prevention (`noOverlap`). ### [`v4.1.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#410---2025-05-30) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.7...v4.1.0) ##### Added - Jitter via the `maxRandomDelay` option. ##### Fixed - `createID` compatibility with older Node versions (e.g. Node 16). ### [`v4.0.7`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#407---2025-05-22) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.6...v4.0.7) ##### Fixed - Dropped `timeZoneName` from the localized-time conversion (DST handling). ### [`v4.0.6`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#406---2025-05-20) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.5...v4.0.6) ##### Fixed - `getNextMatch` edge cases, including a time parsed as `24:00`. ### [`v4.0.5`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#405---2025-05-13) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.4...v4.0.5) ##### Added - Missing task options. ### [`v4.0.4`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#404---2025-05-12) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.3...v4.0.4) ##### Fixed - GMT offset on Node 16 and the `crypto` import. ### [`v4.0.3`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#403---2025-05-11) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.2...v4.0.3) ##### Fixed - Background task file resolution path. ### [`v4.0.2`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#402---2025-05-11) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.1...v4.0.2) ##### Fixed - Cap the heartbeat delay so long intervals don't overflow `setTimeout`. ### [`v4.0.1`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#401---2025-05-11) [Compare Source](https://github.com/node-cron/node-cron/compare/v4.0.0...v4.0.1) ##### Fixed - Dual CommonJS/ESM build output. ### [`v4.0.0`](https://github.com/node-cron/node-cron/blob/HEAD/CHANGELOG.md#400---2025-05-10) [Compare Source](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](https://nodecron.com/migrating-from-v3). [4.5.0]: https://github.com/node-cron/node-cron/compare/v4.4.1...v4.5.0 [4.4.1]: https://github.com/node-cron/node-cron/compare/v4.4.0...v4.4.1 [4.4.0]: https://github.com/node-cron/node-cron/compare/v4.3.0...v4.4.0 [4.3.0]: https://github.com/node-cron/node-cron/compare/v4.2.1...v4.3.0 [4.2.1]: https://github.com/node-cron/node-cron/compare/v4.2.0...v4.2.1 [4.2.0]: https://github.com/node-cron/node-cron/compare/v4.1.1...v4.2.0 [4.1.1]: https://github.com/node-cron/node-cron/compare/v4.1.0...v4.1.1 [4.1.0]: https://github.com/node-cron/node-cron/compare/v4.0.7...v4.1.0 [4.0.7]: https://github.com/node-cron/node-cron/compare/v4.0.6...v4.0.7 [4.0.6]: https://github.com/node-cron/node-cron/compare/v4.0.5...v4.0.6 [4.0.5]: https://github.com/node-cron/node-cron/compare/v4.0.4...v4.0.5 [4.0.4]: https://github.com/node-cron/node-cron/compare/v4.0.3...v4.0.4 [4.0.3]: https://github.com/node-cron/node-cron/compare/v4.0.2...v4.0.3 [4.0.2]: https://github.com/node-cron/node-cron/compare/v4.0.1...v4.0.2 [4.0.1]: https://github.com/node-cron/node-cron/compare/v4.0.0...v4.0.1 [4.0.0]: https://github.com/node-cron/node-cron/releases/tag/v4.0.0 [#&#8203;147]: https://github.com/node-cron/node-cron/issues/147 [#&#8203;484]: https://github.com/node-cron/node-cron/issues/484 [#&#8203;485]: https://github.com/node-cron/node-cron/issues/485 [#&#8203;518]: https://github.com/node-cron/node-cron/issues/518 [#&#8203;535]: https://github.com/node-cron/node-cron/pull/535 [#&#8203;557]: https://github.com/node-cron/node-cron/pull/557 [#&#8203;560]: https://github.com/node-cron/node-cron/pull/560 [#&#8203;561]: https://github.com/node-cron/node-cron/pull/561 [#&#8203;562]: https://github.com/node-cron/node-cron/pull/562 [#&#8203;563]: https://github.com/node-cron/node-cron/pull/563 [#&#8203;564]: https://github.com/node-cron/node-cron/pull/564 [#&#8203;565]: https://github.com/node-cron/node-cron/pull/565 [#&#8203;566]: https://github.com/node-cron/node-cron/pull/566 [#&#8203;567]: https://github.com/node-cron/node-cron/pull/567 [#&#8203;568]: https://github.com/node-cron/node-cron/pull/568 [#&#8203;547]: https://github.com/node-cron/node-cron/pull/547 [#&#8203;548]: https://github.com/node-cron/node-cron/pull/548 [#&#8203;549]: https://github.com/node-cron/node-cron/pull/549 </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI5LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
renovate force-pushed renovate/node-cron-4.x from 5b5fbd8bbe to 43e087a695 2026-06-18 02:33:29 +02:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/node-cron-4.x:renovate/node-cron-4.x
git switch renovate/node-cron-4.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff renovate/node-cron-4.x
git switch renovate/node-cron-4.x
git rebase main
git switch main
git merge --ff-only renovate/node-cron-4.x
git switch renovate/node-cron-4.x
git rebase main
git switch main
git merge --no-ff renovate/node-cron-4.x
git switch main
git merge --squash renovate/node-cron-4.x
git switch main
git merge --ff-only renovate/node-cron-4.x
git switch main
git merge renovate/node-cron-4.x
git push origin main
Sign in to join this conversation.
No description provided.