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
Name | Type |
---|---|
options | Backfill | 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
Name | Type | Description |
---|---|---|
note? | string | A 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
Name | Type | Description |
---|---|---|
overlap? | ScheduleOverlapPolicy | Override the Overlap Policy for this one trigger. Defaults to ScheduleOverlapPolicy.ALLOW_ALL. |
Returns
Promise
<void
>
unpause
▸ unpause(note?
): Promise
<void
>
Unpause the Schedule
Parameters
Name | Type | Description |
---|---|---|
note? | string | A 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
Name | Type |
---|---|
W | extends Workflow = Workflow |
Parameters
Name | Type |
---|---|
updateFn | (previous : ScheduleDescription ) => ScheduleUpdateOptions <ScheduleOptionsStartWorkflowAction <W >> |
Returns
Promise
<void
>