Interface: ScheduleOptions<A>
The specification of a Schedule to be created, as expected by ScheduleClient.create.
Type Parameters
A
A extends ScheduleOptionsAction = ScheduleOptionsAction
Properties
action
action:
A
Which Action to take
memo?
optionalmemo?:Record<string,unknown>
Additional non-indexed information attached to the Schedule. The values can be anything that is serializable by the DataConverter.
policies?
optionalpolicies?:object
catchupWindow?
optionalcatchupWindow?: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. If omitted, the Temporal
Server's configured default applies. 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.)
Format
number of milliseconds or ms-formatted string
overlap?
optionaloverlap?: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
ScheduleOverlapPolicy.SKIP
pauseOnFailure?
optionalpauseOnFailure?: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
false
scheduleId
scheduleId:
string
Schedule Id
We recommend using a meaningful business identifier.
searchAttributes?
optionalsearchAttributes?: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.
Deprecated
Use typedSearchAttributes instead.
spec
spec:
ScheduleSpec
When Actions should be taken
state?
optionalstate?:object
The initial state of the schedule, right after creation or update.
backfill?
optionalbackfill?: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?
optionalnote?: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?
optionalpaused?:boolean
Start in paused state.
Default
false
remainingActions?
optionalremainingActions?: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
undefined, which allows for unlimited exections
triggerImmediately?
optionaltriggerImmediately?:boolean
Trigger one Action immediately on create.
Default
false
typedSearchAttributes?
optionaltypedSearchAttributes?:SearchAttributePair[] |TypedSearchAttributes
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.
If both searchAttributes and typedSearchAttributes are provided, conflicting keys will be overwritten by typedSearchAttributes.