Temporal CLI workflow command reference
In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.
Learn more commands allow operations to be performed on Workflow Executions
A Temporal Workflow Execution is a durable, scalable, reliable, and reactive function execution. It is the main unit of execution of a Temporal Application.
Learn more.
cancel
The temporal workflow cancel
command cancels a Workflow ExecutionWhat 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.
Learn more.
Canceling a running Workflow Execution records a WorkflowExecutionCancelRequested
event in the Event HistoryWhat is an Event History?
An append log of Events that represents the full state a Workflow Execution.
Learn more.
A new Workflow TaskWhat is a Workflow Task?
A Workflow Task is a Task that contains the context needed to make progress with a Workflow Execution.
Learn more will be scheduled, and the Workflow Execution performs cleanup work.
temporal workflow cancel --workflow-id=meaningful-business-id
In addition to Workflow IDs, Workflows can also be SignaledWhat is a Signal?
A Signal is an asynchronous request to a Workflow Execution.
Learn more by a QueryWhat is a Query?
A Query is a synchronous operation that is used to report the state of a Workflow Execution.
Learn more.
temporal workflow cancel --query=MyQuery
Use the options listed below to change the behavior of this command.
- --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --query
temporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reason
temporal reason
Reason for the operation
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more - --yes
temporal yes
Confirm all prompts.
Learn more
count
The temporal workflow count
command returns a count of Workflow ExecutionsWhat 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.
Learn more.
This command requires Elasticsearch to be enabled.
Use the options listed below to change the command's behavior.
- --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --query
temporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more
delete
The temporal workflow delete
command deletes the specified Workflow ExecutionWhat 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.
Learn more.
Use the options listed below to change the command's behavior.
- --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
describe
The temporal workflow describe
command shows information about a given Workflow ExecutionWhat 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.
Learn more.
This information can be used to locate Workflow Executions that weren't able to run successfully.
temporal workflow describe --workflow-id=meaningful-business-id
The output of this command can be changed to show as printed ('raw') or to only show the Workflow Execution's auto-reset points.
temporal workflow describe --workflow-id=meaningful-business-id --raw=true --reset-points=true
Use the command options listed below to change the information returned by this command.
- --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --raw
temporal raw
Print raw data as json (prefer this over -o json for scripting).
Learn more - --reset-points
temporal reset-points
Only show Workflow Events that are eligible for reset.
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
execute
The temporal workflow execute
command starts a new Workflow ExecutionWhat 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.
Learn more and prints its progress.
The command doesn't finish until the Workflow Execution completes.
To execute a WorkflowWhat is a Workflow?
In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.
Learn more from the CLI:
temporal workflow execute --workflow-id=meaningful-business-id --type=MyWorkflow --task-queue=MyTaskQueue
Single quotes('') are used to wrap input as JSON.
temporal workflow execute --workflow-id=meaningful-business-id --type-MyWorkflow --task-queue-MyTaskQueue --input='{"JSON": "Input"}'
Use the command options listed below to change how the Workflow Execution behaves during its run.
- --cron
temporal cron
Optional Cron Schedule for the Workflow.
Learn more - --execution-timeout
temporal execution-timeout
Timeout (in seconds) for a WorkflowExecution, including retries and continue-as-new tasks.
Learn more - --fields
temporal fields
Customize fields to print.
Learn more - --id-reuse-policy
temporal id-reuse-policy
Allows the same Workflow Id to be used in a new Workflow Execution.
Learn more - --input
temporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-file
temporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --max-field-length
temporal max-field-length
Maximum length for each attribute field.
Learn more - --memo
temporal memo
Set a memo on a schedule (in key=value format).
Learn more - --memo-file
temporal memo-file
Set a memo from a file.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-timeout
temporal run-timeout
Timeout (in seconds) of a single Workflow run.
Learn more - --search-attribute
temporal search-attribute
Set Search Attribute on a schedule.
Learn more - --task-queue
temporal task-queue
Task Queue
Learn more - --task-timeout
temporal task-timeout
Start-to-close timeout for a Workflow Task (in seconds).
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --type
temporal type
Search attribute type.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
list
The temporal workflow list
command provides a list of Workflow ExecutionsWhat 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.
Learn more that meet the criteria of a given QueryWhat is a Query?
A Query is a synchronous operation that is used to report the state of a Workflow Execution.
Learn more.
By default, this command returns a list of up to 10 closed Workflow Executions.
temporal workflow list --query=MyQuery
The command can also return a list of archived Workflow Executions.
temporal workflow list --archived=true
Use the command options listed below to change the information returned by this command.
- --archived
temporal archived
List archived Workflow Executions.
Learn more - --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --query
temporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more
query
The temporal workflow query
command sends a QueryWhat is a Query?
A Query is a synchronous operation that is used to report the state of a Workflow Execution.
Learn more to a Workflow ExecutionWhat 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.
Learn more.
Queries can retrieve all or part of the Workflow state within given parameters.
Queries can also be used on completed WorkflowsWhat 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.
Learn more.
temporal workflow query --workflow-id=meaningful-business-id --type=MyQueryType
Use the command options listed below to change the information returned by this command.
- --fields
temporal fields
Customize fields to print.
Learn more - --input
temporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-file
temporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reject-condition
temporal reject-condition
Optional flag for rejecting Queries based on Workflow state.
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --type
temporal type
Search attribute type.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
reset
The temporal workflow reset
command resets a Workflow ExecutionWhat 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.
Learn more.
A reset allows the Workflow to be resumed from a certain point without losing your parameters or Event HistoryWhat is an Event History?
An append log of Events that represents the full state a Workflow Execution.
Learn more.
The Workflow Execution can be set to a given Event TypeWhat is an Event?
Events are created by the Temporal Cluster in response to external occurrences and Commands generated by a Workflow Execution.
Learn more.
temporal workflow reset --workflow-id=meaningful-business-id --type=LastContinuedAsNew
Alternatively, the Workflow Execution can be reset to any Event after WorkflowTaskStarted.
temporal workflow reset --workflow-id=meaningful-business-id --event-id=MyLastEvent
Use the options listed below to change reset behavior.
- --event-id
temporal event-id
The Event Id for any Event after WorkflowTaskStarted you want to reset to (exclusive).
Learn more - --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reapply-type
temporal reapply-type
Event types to reapply after the reset point.
Learn more - --reason
temporal reason
Reason for the operation
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --type
temporal type
Search attribute type.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
reset-batch
The temporal workflow reset-batch
command resets a batch of Workflow ExecutionsWhat 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.
Learn more by resetType
.
Resetting a WorkflowWhat is a Workflow?
In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.
Learn more allows the process to resume from a certain point without losing your parameters or Event HistoryWhat is an Event History?
An append log of Events that represents the full state a Workflow Execution.
Learn more.
The set of Workflow Executions to reset can be specified in an input file.
The input file must have a Workflow IDWhat is a Workflow Id?
A Workflow Id is a customizable, application-level identifier for a Workflow Execution that is unique to an Open Workflow Execution within a Namespace.
Learn more on each line.
temporal workflow reset-batch --input-file=MyInput --input-separator="\t"
Workflow Executions can also be found by QueryWhat is a Query?
A Query is a synchronous operation that is used to report the state of a Workflow Execution.
Learn more.
`temporal workflow reset-batch --query=MyQuery
Use the options listed below to change reset behavior.
- --dry-run
temporal dry-run
Simulate reset without resetting any Workflow Executions.
Learn more - --exclude-file
temporal exclude-file
Input file that specifies Workflow Executions to exclude from resetting.
Learn more - --fields
temporal fields
Customize fields to print.
Learn more - --input-file
temporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --input-parallelism
temporal input-parallelism
Number of goroutines to run in parallel.
Learn more - --input-separator
temporal input-separator
Separator for the input file.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --non-deterministic
temporal non-deterministic
Reset Workflow Execution only if its last Event is WorkflowTaskFailed with a nondeterministic error.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --query
temporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reason
temporal reason
Reason for the operation
Learn more - --skip-base-is-not-current
temporal skip-base-is-not-current
Skip a Workflow Execution if the base Run is not the current Run.
Learn more - --skip-current-open
temporal skip-current-open
Skip a Workflow Execution if the current Run is open for the same Workflow Id as the base Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --type
temporal type
Search attribute type.
Learn more
show
The temporal workflow show
command provides the Event HistoryWhat is an Event History?
An append log of Events that represents the full state a Workflow Execution.
Learn more for a specified Workflow ExecutionWhat 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.
Learn more.
Use the options listed below to change the command's behavior.
- --fields
temporal fields
Customize fields to print.
Learn more - --follow
temporal follow
Follow the progress of a Workflow Execution.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --max-field-length
temporal max-field-length
Maximum length for each attribute field.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --output-filename
temporal output-filename
Serializes Event History to a file.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reset-points
temporal reset-points
Only show Workflow Events that are eligible for reset.
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
signal
The temporal workflow signal
command is used to SignalWhat is a Signal?
A Signal is an asynchronous request to a Workflow Execution.
Learn more a Workflow ExecutionWhat 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.
Learn more by ID or List FilterWhat is a List Filter?
A List Filter is the SQL-like string that is provided as the parameter to an Advanced Visibility List API.
Learn more.
Use the options listed below to change the command's behavior.
- --fields
temporal fields
Customize fields to print.
Learn more - --input
temporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-file
temporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --name
temporal name
Frontend address of the remote Cluster.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --query
temporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reason
temporal reason
Reason for the operation
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more - --yes
temporal yes
Confirm all prompts.
Learn more
stack
The temporal workflow stack
command queries a Workflow ExecutionWhat 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.
Learn more with --stack-trace
as the QueryWhat is a Query?
A Query is a synchronous operation that is used to report the state of a Workflow Execution.
Learn more type.
Returning the stack trace of all the threads owned by a Workflow Execution can be great for troubleshooting in production.
Use the options listed below to change the command's behavior.
- --fields
temporal fields
Customize fields to print.
Learn more - --input
temporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-file
temporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reject-condition
temporal reject-condition
Optional flag for rejecting Queries based on Workflow state.
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
start
The temporal workflow start
command starts a new Workflow ExecutionWhat 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.
Learn more.
When invoked successfully, the Workflow and Run ID are returned immediately after starting the WorkflowWhat is a Workflow?
In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a Workflow Execution.
Learn more.
temporal workflow start --task-queue=MyTaskQueue --type=MyWorkflow
Use the command options listed below to change how the Workflow Execution behaves upon starting.
- --cron
temporal cron
Optional Cron Schedule for the Workflow.
Learn more - --execution-timeout
temporal execution-timeout
Timeout (in seconds) for a WorkflowExecution, including retries and continue-as-new tasks.
Learn more - --fields
temporal fields
Customize fields to print.
Learn more - --id-reuse-policy
temporal id-reuse-policy
Allows the same Workflow Id to be used in a new Workflow Execution.
Learn more - --input
temporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-file
temporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --max-field-length
temporal max-field-length
Maximum length for each attribute field.
Learn more - --memo
temporal memo
Set a memo on a schedule (in key=value format).
Learn more - --memo-file
temporal memo-file
Set a memo from a file.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-timeout
temporal run-timeout
Timeout (in seconds) of a single Workflow run.
Learn more - --search-attribute
temporal search-attribute
Set Search Attribute on a schedule.
Learn more - --task-queue
temporal task-queue
Task Queue
Learn more - --task-timeout
temporal task-timeout
Start-to-close timeout for a Workflow Task (in seconds).
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --type
temporal type
Search attribute type.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more
terminate
The temporal workflow terminate
command terminates a Workflow ExecutionWhat 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.
Learn more
Terminating a running Workflow Execution records a WorkflowExecutionTerminated
event as the closing Event in the Event HistoryWhat is an Event History?
An append log of Events that represents the full state a Workflow Execution.
Learn more.
Any further CommandWhat is a Command?
A Command is a requested action issued by a Worker to the Temporal Cluster after a Workflow Task Execution completes.
Learn more Tasks cannot be scheduled after running this command.
Workflow terminations require a valid Workflow IDWhat is a Workflow Id?
A Workflow Id is a customizable, application-level identifier for a Workflow Execution that is unique to an Open Workflow Execution within a Namespace.
Learn more to function.
temporal workflow terminate --workflow-id=meaningful-business-id
Use the options listed below to change termination behavior.
- --fields
temporal fields
Customize fields to print.
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --query
temporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reason
temporal reason
Reason for the operation
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more - --yes
temporal yes
Confirm all prompts.
Learn more
trace
The temporal workflow trace
command tracks the progress of a Workflow ExecutionWhat 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.
Learn more and any Child WorkflowsWhat is a Child Workflow Execution?
A Child Workflow Execution is a Workflow Execution that is spawned from within another Workflow.
Learn more it generates.
Use the options listed below to change the command's behavior.
- --concurrency
temporal concurrency
Request concurrency.
Learn more - --depth
temporal depth
Number of Child Workflows to expand.
Learn more - --fields
temporal fields
Customize fields to print.
Learn more - --fold
temporal fold
Statuses for which Child Workflows will be folded in (this will reduce the number of information fetched and displayed).
Learn more - --limit
temporal limit
Number of items to print.
Learn more - --no-fold
temporal no-fold
Disable folding
Learn more - --no-pager
temporal no-pager
Disables the interactive pager.
Learn more - --output
temporal output
Output format.
Learn more - --pager
temporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-id
temporal run-id
Identifies the current Workflow Run.
Learn more - --time-format
temporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-id
temporal workflow-id
Workflow Id
Learn more