Skip to main content

Temporal CLI schedule command reference

Schedule commands allow the user to create, use, and update Schedules 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
. Schedules control when certain Actions for a Workflow Execution 🔗
What is a Workflow Execution?
A Temporal Workflow Execution is a durable, scalable, reliable, and reactive function execution. It is the main unit of execution of a Temporal Application.
term explanation
are performed, making it a useful tool for automation.

To run a Schedule command, run temporal schedule [command] [command options].

backfill

The temporal schedule backfill command executes Actions ahead of their specified time range. Backfilling can be used to fill in Workflow Runs 🔗

What is a Run Id?
A Run Id is a globally unique, platform-level identifier for a Workflow Execution.
term explanation
from a time period when the Schedule was paused, or from before the Schedule was created.

Schedule backfills require a valid Schedule ID, along with the time in which to run the Schedule and a change to the overlap policy.

temporal schedule backfill --schedule-id 'your-schedule-id' \
--overlap-policy 'BufferAll' \
--start-time '2022-05-0101T00:00:00Z' \
--end-time '2022-05-31T23:59:59Z'

Use the options provided below to change this command's behavior.

  • --end-time 🔗

    temporal end-time
    Backfill end time.
    cli reference temporal cli options-feature command-line-interface-cli schedule backfill backfill

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --overlap-policy 🔗

    temporal overlap-policy
    Overlap policy.
    cli reference temporal cli options-feature command-line-interface-cli overlap policy

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --start-time 🔗

    temporal start-time
    Backfill start time.
    cli reference temporal cli options-feature command-line-interface-cli schedule backfill schedules

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

create

The temporal schedule create command creates a new Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
. Newly created Schedules return a Schedule ID to be used in other Schedule commands.

Schedules need to follow a format like the example shown here:

temporal schedule create \
--schedule-id 'your-schedule-id' \
--workflow-id 'your-workflow-id' \
--task-queue 'your-task-queue' \
--workflow-type 'YourWorkflowType'

Any combination of --calendar, --interval, and --cron is supported. Actions will be executed at any time specified in the Schedule.

Use the options provided below to change the command's behavior.

  • --calendar 🔗

    temporal calendar
    Calendar specification in JSON.
    cli reference temporal cli calendar options-feature command-line-interface-cli

  • --catchup-window 🔗

    temporal catchup-window
    Maximum allowed catch-up time if server is down.
    cli reference temporal cli server options-feature command-line-interface-cli

  • --cron 🔗

    temporal cron
    Optional Cron Schedule for the Workflow.
    cli reference temporal cli options-feature command-line-interface-cli cron

  • --end-time 🔗

    temporal end-time
    Backfill end time.
    cli reference temporal cli options-feature command-line-interface-cli schedule backfill backfill

  • --execution-timeout 🔗

    temporal execution-timeout
    Timeout (in seconds) for a Workflow Execution, including retries and continue-as-new tasks.
    cli reference temporal cli options-feature command-line-interface-cli workflow execution retries timeout continue-as-new

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --input 🔗

    temporal input
    Optional JSON input to provide to the Workflow.
    cli reference temporal cli options-feature command-line-interface-cli workflow

  • --input-file 🔗

    temporal input-file
    Passes optional input for the Workflow from a JSON file.
    cli reference temporal cli options-feature command-line-interface-cli

  • --interval 🔗

    temporal interval
    Interval duration to include phase offset.
    cli reference temporal cli options-feature command-line-interface-cli interval

  • --jitter 🔗

    temporal jitter
    Jitter duration.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --max-field-length 🔗

    temporal max-field-length
    Maximum length for each attribute field.
    cli reference temporal cli options-feature command-line-interface-cli search attributes

  • --memo 🔗

    temporal memo
    Set a memo on a schedule (in key=value format).
    cli reference temporal cli options-feature command-line-interface-cli memo

  • --memo-file 🔗

    temporal memo-file
    Set a memo from a file.
    cli reference temporal cli options-feature command-line-interface-cli memo

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --notes 🔗

    temporal notes
    Initial value of notes field.
    cli reference temporal cli options-feature command-line-interface-cli notes

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --overlap-policy 🔗

    temporal overlap-policy
    Overlap policy.
    cli reference temporal cli options-feature command-line-interface-cli overlap policy

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --pause 🔗

    temporal pause
    Pauses the Schedule.
    cli reference temporal cli options-feature command-line-interface-cli schedule pause schedule

  • --pause-on-failure 🔗

    temporal pause-on-failure
    Pause schedule after any workflow failure.
    cli reference temporal cli options-feature command-line-interface-cli schedule pause schedule

  • --remaining-actions 🔗

    temporal remaining-actions
    Total number of actions allowed.
    cli reference temporal cli options-feature command-line-interface-cli actions

  • --run-timeout 🔗

    temporal run-timeout
    Timeout (in seconds) of a single Workflow run.
    cli reference temporal cli options-feature command-line-interface-cli workflow run timeout

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --search-attribute 🔗

    temporal search-attribute
    Set Search Attribute on a schedule.
    cli reference temporal cli options-feature command-line-interface-cli search attributes schedule

  • --start-time 🔗

    temporal start-time
    Backfill start time.
    cli reference temporal cli options-feature command-line-interface-cli schedule backfill schedules

  • --task-queue 🔗

    temporal task-queue
    Task Queue
    cli reference temporal cli options-feature command-line-interface-cli task queue

  • --task-timeout 🔗

    temporal task-timeout
    Start-to-close timeout for a Workflow Task (in seconds).
    cli reference temporal cli options-feature command-line-interface-cli timeout workflow task start-to-close

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

  • --time-zone 🔗

    temporal time-zone
    Time zone (IANA name).
    cli reference temporal cli options-feature command-line-interface-cli time zone

  • --workflow-id 🔗

    temporal workflow-id
    Workflow Id
    cli reference temporal cli options-feature command-line-interface-cli workflow id

  • --workflow-type 🔗

    temporal workflow-type
    Workflow type name.
    cli reference temporal cli options-feature command-line-interface-cli workflow type

delete

The temporal schedule delete command deletes a Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
. Deleting a Schedule does not affect any Workflows 🔗
What is a Workflow?
In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.
term explanation
started by the Schedule.

Workflow Executions 🔗

What is a Workflow Execution?
A Temporal Workflow Execution is a durable, scalable, reliable, and reactive function execution. It is the main unit of execution of a Temporal Application.
term explanation
started by Schedules can be cancelled or terminated like other Workflow Executions. However, Workflow Executions started by a Schedule can be identified by their Search Attributes 🔗
What is a Search Attribute?
A Search Attribute is an indexed name used in List Filters to filter a list of Workflow Executions that have the Search Attribute in their metadata.
term explanation filtered-lists visibility
, making them targetable by batch command for termination.

temporal schedule delete --schedule-id 'your-schedule-id' [command options]

Use the options below to change the behavior of this command.

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

describe

The temporal schedule describe command shows the current Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
configuration. This command also provides information about past, current, and future Workflow Runs 🔗
What is a Run Id?
A Run Id is a globally unique, platform-level identifier for a Workflow Execution.
term explanation
.

temporal schedule describe --schedule-id 'your-schedule-id' [command options]

Use the options below to change this command's output.

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --raw 🔗

    temporal raw
    Print raw data as json (prefer this over -o json for scripting).
    cli reference temporal cli options-feature command-line-interface-cli

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

list

The temporal schedule list command lists all Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
configurations. Listing Schedules in Standard Visibility 🔗
What is standard Visibility?
Standard Visibility, within the Temporal Platform, is the subsystem and APIs that list Workflow Executions by a predefined set of filters.
explanation filtered-lists visibility
will only provide Schedule IDs.

temporal schedule list

Use the options below to change the behavior of this command.

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

toggle

The temporal schedule toggle command can pause and unpause a Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
.

Toggling a Schedule requires a reason to be entered on the command line. Use --reason to note the issue leading to the pause or unpause.

Schedule toggles are passed in this format: temporal schedule toggle --schedule-id 'your-schedule-id' --pause --reason "paused because the database is down" temporal schedule toggle --schedule-id 'your-schedule-id' --unpause --reason "the database is back up"

Use the options provided below to change this command's behavior.

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --pause 🔗

    temporal pause
    Pauses the Schedule.
    cli reference temporal cli options-feature command-line-interface-cli schedule pause schedule

  • --reason 🔗

    temporal reason
    Reason for the operation
    cli reference temporal cli options-feature command-line-interface-cli operation

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

  • --unpause 🔗

    temporal unpause
    Unpauses the Schedule.
    cli reference temporal cli options-feature command-line-interface-cli schedule unpause schedules

trigger

The temporal schedule trigger command triggers an immediate action with a given Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
. By default, this action is subject to the Overlap Policy of the Schedule.

Schedule triggers are passed in this format: temporal schedule trigger can be used to start a Workflow Run immediately. temporal schedule trigger --schedule-id 'your-schedule-id'

The Overlap Policy of the Schedule can be overridden as well. temporal schedule trigger --schedule-id 'your-schedule-id' --overlap-policy 'AllowAll'

Use the options provided below to change this command's behavior.

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --overlap-policy 🔗

    temporal overlap-policy
    Overlap policy.
    cli reference temporal cli options-feature command-line-interface-cli overlap policy

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

update

The temporal schedule update command updates an existing Schedule 🔗

What is a Schedule?
A Schedule enables the scheduling of Workflow Executions.
term explanation
.

Like temporal schedule create, updated Schedules need to follow a certain format:

temporal schedule update                \
--schedule-id 'your-schedule-id' \
--workflow-id 'your-workflow-id' \
--task-queue 'your-task-queue' \
--workflow-type 'YourWorkflowType'

Updating a Schedule takes the given options and replaces the entire configuration of the Schedule with what's provided. If you only change one value of the Schedule, be sure to provide the other unchanged fields to prevent them from being overwritten.

Use the options provided below to change the command's behavior.

  • --calendar 🔗

    temporal calendar
    Calendar specification in JSON.
    cli reference temporal cli calendar options-feature command-line-interface-cli

  • --catchup-window 🔗

    temporal catchup-window
    Maximum allowed catch-up time if server is down.
    cli reference temporal cli server options-feature command-line-interface-cli

  • --cron 🔗

    temporal cron
    Optional Cron Schedule for the Workflow.
    cli reference temporal cli options-feature command-line-interface-cli cron

  • --end-time 🔗

    temporal end-time
    Backfill end time.
    cli reference temporal cli options-feature command-line-interface-cli schedule backfill backfill

  • --execution-timeout 🔗

    temporal execution-timeout
    Timeout (in seconds) for a Workflow Execution, including retries and continue-as-new tasks.
    cli reference temporal cli options-feature command-line-interface-cli workflow execution retries timeout continue-as-new

  • --fields 🔗

    temporal fields
    Customize fields to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --input 🔗

    temporal input
    Optional JSON input to provide to the Workflow.
    cli reference temporal cli options-feature command-line-interface-cli workflow

  • --input-file 🔗

    temporal input-file
    Passes optional input for the Workflow from a JSON file.
    cli reference temporal cli options-feature command-line-interface-cli

  • --interval 🔗

    temporal interval
    Interval duration to include phase offset.
    cli reference temporal cli options-feature command-line-interface-cli interval

  • --jitter 🔗

    temporal jitter
    Jitter duration.
    cli reference temporal cli options-feature command-line-interface-cli

  • --limit 🔗

    temporal limit
    Number of items to print.
    cli reference temporal cli options-feature command-line-interface-cli

  • --max-field-length 🔗

    temporal max-field-length
    Maximum length for each attribute field.
    cli reference temporal cli options-feature command-line-interface-cli search attributes

  • --memo 🔗

    temporal memo
    Set a memo on a schedule (in key=value format).
    cli reference temporal cli options-feature command-line-interface-cli memo

  • --memo-file 🔗

    temporal memo-file
    Set a memo from a file.
    cli reference temporal cli options-feature command-line-interface-cli memo

  • --no-pager 🔗

    temporal no-pager
    Disables the interactive pager.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --notes 🔗

    temporal notes
    Initial value of notes field.
    cli reference temporal cli options-feature command-line-interface-cli notes

  • --output 🔗

    temporal output
    Output format.
    cli reference temporal cli options-feature command-line-interface-cli

  • --overlap-policy 🔗

    temporal overlap-policy
    Overlap policy.
    cli reference temporal cli options-feature command-line-interface-cli overlap policy

  • --pager 🔗

    temporal pager
    Sets the pager for Temporal CLI to use.
    cli reference temporal cli options-feature command-line-interface-cli pager

  • --pause 🔗

    temporal pause
    Pauses the Schedule.
    cli reference temporal cli options-feature command-line-interface-cli schedule pause schedule

  • --pause-on-failure 🔗

    temporal pause-on-failure
    Pause schedule after any workflow failure.
    cli reference temporal cli options-feature command-line-interface-cli schedule pause schedule

  • --remaining-actions 🔗

    temporal remaining-actions
    Total number of actions allowed.
    cli reference temporal cli options-feature command-line-interface-cli actions

  • --run-timeout 🔗

    temporal run-timeout
    Timeout (in seconds) of a single Workflow run.
    cli reference temporal cli options-feature command-line-interface-cli workflow run timeout

  • --schedule-id 🔗

    temporal schedule-id
    Schedule Id
    cli reference temporal cli options-feature command-line-interface-cli schedule id schedule

  • --search-attribute 🔗

    temporal search-attribute
    Set Search Attribute on a schedule.
    cli reference temporal cli options-feature command-line-interface-cli search attributes schedule

  • --start-time 🔗

    temporal start-time
    Backfill start time.
    cli reference temporal cli options-feature command-line-interface-cli schedule backfill schedules

  • --task-queue 🔗

    temporal task-queue
    Task Queue
    cli reference temporal cli options-feature command-line-interface-cli task queue

  • --task-timeout 🔗

    temporal task-timeout
    Start-to-close timeout for a Workflow Task (in seconds).
    cli reference temporal cli options-feature command-line-interface-cli timeout workflow task start-to-close

  • --time-format 🔗

    temporal time-format
    Format time as either relative, iso, raw.
    cli reference temporal cli options-feature command-line-interface-cli time

  • --time-zone 🔗

    temporal time-zone
    Time zone (IANA name).
    cli reference temporal cli options-feature command-line-interface-cli time zone

  • --workflow-id 🔗

    temporal workflow-id
    Workflow Id
    cli reference temporal cli options-feature command-line-interface-cli workflow id

  • --workflow-type 🔗

    temporal workflow-type
    Workflow type name.
    cli reference temporal cli options-feature command-line-interface-cli workflow type