Skip to main content

Interface: ScheduleOptions<A>


The specification of a Schedule to be created, as expected by create.

Type parameters

Aextends ScheduleOptionsAction = ScheduleOptionsAction



action: A

Which Action to take


Optional memo: Record<string, unknown>

Additional non-indexed information attached to the Schedule. The values can be anything that is serializable by the DataConverter.


Optional policies: Object

Type declaration

catchupWindow?string | numberThe 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 backfill.) Default 1 minute Format number of milliseconds or ms-formatted string
overlap?ScheduleOverlapPolicyControls 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 SKIP
pauseOnFailure?booleanWhen an Action times out or reaches the end of its Retry Policy, pause. With 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 false


scheduleId: string

Schedule Id

We recommend using a meaningful business identifier.


Optional searchAttributes: SearchAttributes

Additional indexed information attached to the Schedule. More info:

Values are always converted using JsonPayloadConverter, even when a custom Data Converter is provided.


spec: ScheduleSpec

When Actions should be taken


Optional state: Object

The initial state of the schedule, right after creation or update.

Type declaration

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?stringInformative 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?booleanStart in paused state. Default false
remainingActions?numberLimit 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 trigger is called). If undefined, then no such limit applies. Default undefined, which allows for unlimited exections
triggerImmediately?booleanTrigger one Action immediately on create. Default false