Skip to main content

Interface: SchedulerOptions

Defined in: packages/client/src/core/job-engine/scheduler.ts:98

Properties

PropertyTypeDescriptionDefined in
backoffBaseMs?numberFirst retry delay after a failure; doubles per consecutive failure. Default 5 minutes.packages/client/src/core/job-engine/scheduler.ts:119
intervalMs?numberFloor between automatic ticks. Default 60s, minimum 5s.packages/client/src/core/job-engine/scheduler.ts:115
jobsstring[]Job ids allowed to run unattended. Required, and there is deliberately no "all": see the module docblock. Manual JobEngine.executeJob is unaffected — it already has a human behind it.packages/client/src/core/job-engine/scheduler.ts:105
maxBackoffMs?numberCeiling for that doubling. Default 6 hours.packages/client/src/core/job-engine/scheduler.ts:121
now?() => numberInjectable clock, for tests.packages/client/src/core/job-engine/scheduler.ts:123
onRun?(run) => voidCalled with each completed run, successful or not.packages/client/src/core/job-engine/scheduler.ts:125
pinnedHashes?Record<string, string>Expected hash per job, for jobs whose code must not change under the application. JobModel.hash is stored beside the content it certifies, so a peer that writes one writes the other: on its own it detects corruption, not authorship. Pinning the value in application code is what makes it mean something.packages/client/src/core/job-engine/scheduler.ts:113
staleRunMs?numberA RUNNING run older than this is swept to CANCELED. Default 15 minutes.packages/client/src/core/job-engine/scheduler.ts:117