Task Scheduling — Techniques · NestJS

Work on a clock rather than on a request: feed the cats on an interval, open the shelter once after boot, report on a cron schedule, and pause and resume a named task through the SchedulerRegistry.

What you will learn

Read the theory for Task Scheduling

All Techniques lessons

All NestJS courses

loading types…

What you'll learn

  • Register ScheduleModule and schedule methods with @Cron, @Interval and @Timeout
  • Read a cron pattern and use CronExpression and the options that matter (name, timeZone, waitForCompletion)
  • Stop, start, add and delete named tasks at runtime through the SchedulerRegistry