Skip to main content

Interface: ScheduleHandle

client.ScheduleHandle

Handle to a single Schedule

Properties

client

Readonly client: ScheduleClient

Readonly accessor to the underlying ScheduleClient


scheduleId

Readonly scheduleId: string

This Schedule's identifier

Methods

backfill

backfill(options): Promise<void>

Run though the specified time period(s) and take Actions as if that time passed by right now, all at once. The Overlap Policy can be overridden for the scope of the Backfill.

Parameters

NameType
optionsBackfill | Backfill[]

Returns

Promise<void>


delete

delete(): Promise<void>

Delete the Schedule

Returns

Promise<void>


describe

describe(): Promise<ScheduleDescription>

Fetch the Schedule's description from the Server

Returns

Promise<ScheduleDescription>


pause

pause(note?): Promise<void>

Pause the Schedule

Parameters

NameTypeDescription
note?stringA new ScheduleDescription.note. Defaults to "Paused via TypeScript SDK"

Returns

Promise<void>


trigger

trigger(overlap?): Promise<void>

Trigger an Action to be taken immediately

Parameters

NameTypeDescription
overlap?ScheduleOverlapPolicyOverride the Overlap Policy for this one trigger. Defaults to ScheduleOverlapPolicy.ALLOW_ALL.

Returns

Promise<void>


unpause

unpause(note?): Promise<void>

Unpause the Schedule

Parameters

NameTypeDescription
note?stringA new ScheduleDescription.note. Defaults to `"Unpaused via TypeScript SDK"

Returns

Promise<void>


update

update<W>(updateFn): Promise<void>

Update the Schedule

This function calls .describe(), provides the Schedule to the provided updateFn, and sends the returned UpdatedSchedule to the Server to update the Schedule definition. Note that, in the future, updateFn might be invoked multiple time, with identical or different input.

Type parameters

NameType
Wextends Workflow = Workflow

Parameters

NameType
updateFn(previous: ScheduleDescription) => ScheduleUpdateOptions<ScheduleOptionsStartWorkflowAction<W>>

Returns

Promise<void>