Update dependency node-cron to v4 #22
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
florian/foundry-hosting!22
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/node-cron-4.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
^3.0.3→^4.0.0Release Notes
node-cron/node-cron (node-cron)
v4.6.0Compare Source
Added
Fixed
Changed
v4.5.0Compare Source
Added
lastRun()introspection getter onScheduledTask: returns{ date, result }aftera successful execution,
{ date, error }after a failed one, ornullbefore the firstrun. ([#557])
<weekday>#<nth>(nth weekday of the month, e.g.1#1for the first Monday) and<weekday>L(last weekday of the month, e.g.5Lfor the last Friday). ([#560])
Performance
Intl.DateTimeFormatinstances per timezone instead of rebuilding on everycall. ([#561])
TimeMatcherinstead of re-parsing inMatcherWalker. ([#562])next-run search). ([#563])
crypto.randomByteswithcrypto.randomUUIDfor internal IDgeneration. ([#564])
setTimeoutjitter wrapper whenmaxRandomDelayis zero. ([#565])time). ([#566])
Fixed
should schedule a tasktest: poll for the first execution instead ofasserting an exact count after a fixed sleep.
Changed
interpretetointerpretandappendSeccondExpressiontoappendSecondExpression. ([#567])(overlap prevention, distributed coordination, background tasks). ([#568])
v4.4.1Compare Source
Changed
distributedTtloption todistributedLease(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.distributedTtlwas introduced in 4.4.0 and is removed without an alias.v4.4.0Compare Source
Added
ScheduledTask:getNextRuns(n)(preview the next Nrun times),
match(date),msToNext(),isBusy(),runsLeft()andgetPattern(). ([#547])cron.parse(expression)andcron.validateDetailed(expression):decompose an expression into its fields, or get every field-level problem
(without throwing) for tooling and richer error messages. ([#548])
distributed: trueruns a task on asingle instance per fire across a fleet. Ships a built-in
NODE_CRON_RUNenv-var default (one designated runner, no dependencies) and a pluggable
RunCoordinator(viasetRunCoordinator, or the per-taskrunCoordinatoroption) for high-availability, per-fire coordination (e.g. a Redis lock).
Adds the
distributedTtloption and anexecution:skippedevent carrying areason('not-elected'|'coordinator-error'). Works for inline andbackground tasks. ([#549])
Fixed
getNextMatchno longer scans every time of day on a day that matches theday-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
milisecond→millisecondspelling and theconvertion/→conversion/directory name.v4.3.0Compare 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])missedExecutionToleranceoption (ms, default1000): a heartbeat thatwakes 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])
startTimeoutoption for background tasks (ms, default5000). ([#535])Fixed
getNextMatch: no more ~1-year overshoot when a daily timefalls in the spring-forward gap. ([#518])
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])
skipped runs on daily/weekly schedules. ([#485])
Changed
>= 20.11); tested on Node20, 22 and 24.
v4.2.1Compare Source
Fixed
v4.2.0Compare Source
Added
getTasks()andgetTask(id)to inspect the task registry.v4.1.1Compare Source
Fixed
noOverlap).v4.1.0Compare Source
Added
maxRandomDelayoption.Fixed
createIDcompatibility with older Node versions (e.g. Node 16).v4.0.7Compare Source
Fixed
timeZoneNamefrom the localized-time conversion (DST handling).v4.0.6Compare Source
Fixed
getNextMatchedge cases, including a time parsed as24:00.v4.0.5Compare Source
Added
v4.0.4Compare Source
Fixed
cryptoimport.v4.0.3Compare Source
Fixed
v4.0.2Compare Source
Fixed
setTimeout.v4.0.1Compare Source
Fixed
v4.0.0Compare Source
Full rewrite in TypeScript with a new, event-driven API: lifecycle events,
background tasks (run a task file in a forked process),
createTaskfor tasksthat start stopped, per-task
logger, and a dual ESM/CJS build. The legacyscheduled/runOnInitoptions were removed and several event names changed.See the migration guide.
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate CLI.
5b5fbd8bbeto43e087a695View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.