Skip to main content
Defined in: core/types.ts:361 Options that make a schedule/every/delay task durable: its next run time is persisted in the scheduler’s ScheduleStore under id, so it survives restarts, and each occurrence is claimed under a fenced lease so only one replica runs it.

Properties

id

Defined in: core/types.ts:367 Stable task id, unique per bot (the bot’s store namespace is applied, so two bots sharing a backend never collide). The schedule’s state is keyed by it: keep it stable across deploys. Registering the same id twice throws a TypeError.

missed?

Defined in: core/types.ts:369 Policy for occurrences missed while no scheduler ran. Default 'skip'.

maxCatchUp?

Defined in: core/types.ts:371 Most missed slots one 'catch-up' runs. Default 10. Positive integer.

leaseMs?

Defined in: core/types.ts:377 How long one claimed occurrence stays leased to this process: a duration ('2m') or ms. Renewed every third of it while the handler runs; a crashed runner’s occurrence is retried by another process once it expires. Default '60s'.

timeZone?

Defined in: core/types.ts:384 Cron tasks only (a TypeError on every/delay): the IANA zone the cron fields are read in, with the daylight-saving rules of CronTaskOptions.timeZone. Default: SchedulerOptions.timeZone, else the process zone. The zone is part of the stored spec (TZ=<zone> <cron>), so adding or changing it recomputes the task’s next run.