Skip to content

Releases: node-cron/nestjs

Release list

v0.1.0

Choose a tag to compare

@merencia merencia released this 18 Jun 14:50
20a0945

First release of @node-cron/nestjs: a NestJS integration for node-cron and a drop-in replacement for @nestjs/schedule.

Highlights

  • Same API. @Cron, @Interval, @Timeout, CronExpression, ScheduleModule.forRoot/forRootAsync, SchedulerRegistry. Migrating is a one-line import change.
  • @BackgroundCron. Run a task in a forked child process (its own event loop), declared with a self-referencing single-file pattern.
  • Distributed-ready. distributed: true with a global or per-job RunCoordinator. Works with @node-cron/redis-coordinator for per-fire, highly-available coordination across a fleet.
  • node-cron extras. Overlap control (noOverlap / waitForCompletion), execution caps (maxExecutions), jitter (maxRandomDelay).
  • Ships ESM + CJS + TypeScript types. Node 20+, NestJS 9/10/11.

Install

npm install @node-cron/nestjs node-cron

Notes

  • SchedulerRegistry.getCronJob() returns a node-cron ScheduledTask (not the cron package's CronJob).
  • utcOffset is not supported; use timeZone.