npm / @nestjs/schedule
@nestjs/schedule
What changed in @nestjs/schedule 6 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
6 breaking5 new APIs and options1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/schedule 1210 changes
Breaking changes 6
Duplicate explicit names across @Cron, @Interval, or @Timeout declarations are rejected during initialization rather than conflicting later.
The legacy root index.js shim is gone; use the package name without the explicit shim path.
Lifecycle hooks are now called by component hierarchy level, which can change execution order for related providers or modules and affect initialization or teardown assumptions.
The package is published as pure ESM with an exports map; import from the package root. CommonJS apps can still use require through Node's require(esm) support.
Deep imports into build internals are no longer resolvable; import CronExpression from the package root instead.
Node 20.19+ or 22.12+ is required; on older versions, requiring the ESM package throws ERR_REQUIRE_ESM.
New APIs and options 3
Adds a generic return type parameter to getInterval.
Adds a generic return type parameter to getTimeout.
ScheduleExplorer is now exported from the package entry point, making it directly importable from the package.
Fixes and other changes 1
A deleted job is no longer resurrected after its initialDelay elapses.
@nestjs/schedule 62 changes
New APIs and options 2
Adds an option to defer the first cron job execution.
Adds async module registration.