Skip to content

SchedulerAPI

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

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:264

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:266

Cancels (removes) a job.

string

Promise<void>


pause(token): Promise<void>

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

Pauses a job.

string

Promise<void>


resume(token): Promise<void>

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

Resumes a paused job.

string

Promise<void>


update(token, mutation): Promise<void>

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

Mutates a job in place.

string

AnyJSONValue

Promise<void>


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

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

Returns recent run history.

string

number

Promise<SchedulerRunResult[]>


nextFire(token): Promise<string | null>

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

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

string

Promise<string | null>


triggerNow(token): Promise<SchedulerRunResult>

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

Fires the job immediately through the normal dispatch pipeline.

string

Promise<SchedulerRunResult>