fix(cronmanager): improve cron scheduling and lifecycle handling; add wake/wakeCycle to promptly recalculate scheduling when jobs are added/removed/started/stopped, fix timeout handling, and update tests and deps

This commit is contained in:
2026-02-15 22:57:28 +00:00
parent 51943fad1c
commit 40d72de979
12 changed files with 4724 additions and 4810 deletions

View File

@@ -1,5 +1,16 @@
# Changelog
## 2026-02-15 - 4.2.1 - fix(cronmanager)
improve cron scheduling and lifecycle handling; add wake/wakeCycle to promptly recalculate scheduling when jobs are added/removed/started/stopped, fix timeout handling, and update tests and deps
- CronManager: add wakeCycle (Deferred) to wake the sleeping cycle immediately when jobs change
- CronManager: refactor runCronCycle to compute the soonest next execution (soonestMs), await timeout or wake signal, handle overdue jobs without waiting, and cancel timeouts to avoid lingering timers
- CronJob: guard checkExecution to return when job status is 'stopped' to prevent unnecessary scheduling work
- Stop logic: safely cancel executionTimeout only if present and ensure the cycle is woken when stopping
- Tests: switch test imports to @git.zone/tstest/tapbundle
- Dependencies: bump several devDependencies and dependencies (tsbuild, tsbundle, tstest, croner, smartpromise, dayjs, pretty-ms, etc.)
- Docs/config: expand README with examples and security/reporting info; add @git.zone/cli release config to npmextra.json
## 2024-12-14 - 4.2.0 - feat(ondemand)
Add on-demand timestamp feature