property SchedulerPluginOptions.jobs
Since 0.3.0

Jobs registered declaratively, as an alternative to calling scheduler.cron()/every()/delay() imperatively after start(). Each entry — instance or RegistryFactory — produces one registration call, dispatched on its trigger, so a job can be declared where the plugin is composed instead of after the application has started.

Instance entries register during the plugin's register() phase, identical to the imperative timing. Factory entries are resolved in the onInit phase — the first at which the registry holds every capability — so a factory can build its definition from a resolved capability. A factory that throws rejects start() with an error naming SchedulerPlugin({ jobs }) and the entry's index in THIS declared array, not its position among the factories.

On Cloudflare Workers the plugin refuses registration outright (SchedulerUnavailableError) before any entry is read — the refusal fires before an instance registers and before onInit can resolve a factory.

Type

readonly SchedulerJobEntry[]

Usage

import { type SchedulerPluginOptions } from "scheduler-plugin/src/index.ts";