Interface: ScheduleOptions<A>
client.ScheduleOptions
The specification of a Schedule to be created, as expected by ScheduleClient.create.
Type parameters
Name | Type |
---|---|
A | extends ScheduleOptionsAction = ScheduleOptionsAction |
Properties
action
• action: A
Which Action to take
memo
• Optional
memo: Record
<string
, unknown
>
Additional non-indexed information attached to the Schedule. The values can be anything that is serializable by the DataConverter.
policies
• Optional
policies: Object
Type declaration
Name | Type | Description |
---|---|---|
catchupWindow? | Duration | The Temporal Server might be down or unavailable at the time when a Schedule should take an Action. When the Server comes back up, catchupWindow controls which missed Actions should be taken at that point. The default is one minute, which means that the Schedule attempts to take any Actions that wouldn't be more than one minute late. It takes those Actions according to the ScheduleOverlapPolicy. An outage that lasts longer than the Catchup Window could lead to missed Actions. (But you can always ScheduleHandle.backfill.) Default ts 1 year Format number of milliseconds or ms-formatted string |
overlap? | ScheduleOverlapPolicy | Controls what happens when an Action would be started by a Schedule at the same time that an older Action is still running. This can be changed after a Schedule has taken some Actions, and some changes might produce unintuitive results. In general, the later policy overrides the earlier policy. Default ts {@link ScheduleOverlapPolicy.SKIP} |
pauseOnFailure? | boolean | When an Action times out or reaches the end of its Retry Policy, pause. With ScheduleOverlapPolicy.ALLOW_ALL, this pause might not apply to the next Action, because the next Action might have already started previous to the failed one finishing. Pausing applies only to Actions that are scheduled to start after the failed one finishes. Default ts false |
scheduleId
• scheduleId: string
Schedule Id
We recommend using a meaningful business identifier.
searchAttributes
• Optional
searchAttributes: SearchAttributes
Additional indexed information attached to the Schedule. More info: https://docs.temporal.io/docs/typescript/search-attributes
Values are always converted using JsonPayloadConverter, even when a custom Data Converter is provided.
spec
• spec: ScheduleSpec
When Actions should be taken
state
• Optional
state: Object
The initial state of the schedule, right after creation or update.
Type declaration
Name | Type | Description |
---|---|---|
backfill? | Backfill [] | Runs though the specified time periods and takes Actions as if that time passed by right now, all at once. The overlap policy can be overridden for the scope of the backfill. |
note? | string | Informative human-readable message with contextual notes, e.g. the reason a Schedule is paused. The system may overwrite this message on certain conditions, e.g. when pause-on-failure happens. |
paused? | boolean | Start in paused state. Default ts false |
remainingActions? | number | Limit the number of Actions to take. This number is decremented after each Action is taken, and Actions are not taken when the number is 0 (unless ScheduleHandle.trigger is called). If undefined , then no such limit applies. Default ts undefined, which allows for unlimited exections |
triggerImmediately? | boolean | Trigger one Action immediately on create. Default ts false |