Skip to content

SchedulerAPI

Defined in: namespaces-core-plugins.ts:293

Trigger-kind-agnostic job engine (fn-90). Built-in triggers: interval, cron (DST-safe), notification (event-bus), fsEvents, calendar, powerState, networkState, appLaunch, plus declarative custom trigger kinds.

All methods require scheduler.job.own.

fn-90

scheduleJob(spec): Promise<{ token: string; jobId: string; }>

Defined in: namespaces-core-plugins.ts:295

Schedules a job. Returns an owner-scoped token + job id.

AnyJSONValue

Promise<{ token: string; jobId: string; }>


cancel(token): Promise<void>

Defined in: namespaces-core-plugins.ts:297

Cancels (removes) a job.

string

Promise<void>


pause(token): Promise<void>

Defined in: namespaces-core-plugins.ts:299

Pauses a job.

string

Promise<void>


resume(token): Promise<void>

Defined in: namespaces-core-plugins.ts:301

Resumes a paused job.

string

Promise<void>


update(token, mutation): Promise<void>

Defined in: namespaces-core-plugins.ts:303

Mutates a job in place.

string

AnyJSONValue

Promise<void>


history(token, limit?): Promise<SchedulerRunResult[]>

Defined in: namespaces-core-plugins.ts:305

Returns recent run history.

string

number

Promise<SchedulerRunResult[]>


nextFire(token): Promise<string | null>

Defined in: namespaces-core-plugins.ts:307

Next wall-clock fire time (ISO 8601), or null.

string

Promise<string | null>


triggerNow(token): Promise<SchedulerRunResult>

Defined in: namespaces-core-plugins.ts:309

Fires the job immediately through the normal dispatch pipeline.

string

Promise<SchedulerRunResult>