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 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.
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
eventEvents reference
Events are created by the Temporal Cluster in response to external occurrences and Commands generated by a Workflow Execution.
Learn more 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --querytemporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reasontemporal reason
Reason for the operation
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal workflow-id
Workflow Id
Learn more - --yestemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --querytemporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --time-formattemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --rawtemporal raw
Print raw data as json (prefer this over -o json for scripting).
Learn more - --reset-pointstemporal reset-points
Only show Workflow Events that are eligible for reset.
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal 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.
- --crontemporal cron
Optional Cron Schedule for the Workflow.
Learn more - --execution-timeouttemporal execution-timeout
Timeout (in seconds) for a WorkflowExecution, including retries and continue-as-new tasks.
Learn more - --fieldstemporal fields
Customize fields to print.
Learn more - --id-reuse-policytemporal id-reuse-policy
Allows the same Workflow Id to be used in a new Workflow Execution.
Learn more - --inputtemporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-filetemporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --max-field-lengthtemporal max-field-length
Maximum length for each attribute field.
Learn more - --memotemporal memo
Set a memo on a schedule (in key=value format).
Learn more - --memo-filetemporal memo-file
Set a memo from a file.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-timeouttemporal run-timeout
Timeout (in seconds) of a single Workflow run.
Learn more - --search-attributetemporal search-attribute
Set Search Attribute on a schedule.
Learn more - --task-queuetemporal task-queue
Task Queue
Learn more - --task-timeouttemporal task-timeout
Start-to-close timeout for a Workflow Task (in seconds).
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --typetemporal type
Search attribute type.
Learn more - --workflow-idtemporal 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.
- --archivedtemporal archived
List archived Workflow Executions.
Learn more - --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --querytemporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --time-formattemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --inputtemporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-filetemporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reject-conditiontemporal reject-condition
Optional flag for rejecting Queries based on Workflow state.
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --typetemporal type
Search attribute type.
Learn more - --workflow-idtemporal 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-idtemporal event-id
The Event Id for any Event after WorkflowTaskStarted you want to reset to (exclusive).
Learn more - --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reapply-typetemporal reapply-type
Event types to reapply after the reset point.
Learn more - --reasontemporal reason
Reason for the operation
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --typetemporal type
Search attribute type.
Learn more - --workflow-idtemporal 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-runtemporal dry-run
Simulate reset without resetting any Workflow Executions.
Learn more - --exclude-filetemporal exclude-file
Input file that specifies Workflow Executions to exclude from resetting.
Learn more - --fieldstemporal fields
Customize fields to print.
Learn more - --input-filetemporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --input-parallelismtemporal input-parallelism
Number of goroutines to run in parallel.
Learn more - --input-separatortemporal input-separator
Separator for the input file.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --non-deterministictemporal non-deterministic
Reset Workflow Execution only if its last Event is WorkflowTaskFailed with a nondeterministic error.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --querytemporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reasontemporal reason
Reason for the operation
Learn more - --skip-base-is-not-currenttemporal skip-base-is-not-current
Skip a Workflow Execution if the base Run is not the current Run.
Learn more - --skip-current-opentemporal 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-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --typetemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --followtemporal follow
Follow the progress of a Workflow Execution.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --max-field-lengthtemporal max-field-length
Maximum length for each attribute field.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --output-filenametemporal output-filename
Serializes Event History to a file.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reset-pointstemporal reset-points
Only show Workflow Events that are eligible for reset.
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --inputtemporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-filetemporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --nametemporal name
Frontend address of the remote Cluster.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --querytemporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reasontemporal reason
Reason for the operation
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal workflow-id
Workflow Id
Learn more - --yestemporal 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --inputtemporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-filetemporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --reject-conditiontemporal reject-condition
Optional flag for rejecting Queries based on Workflow state.
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal 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.
- --crontemporal cron
Optional Cron Schedule for the Workflow.
Learn more - --execution-timeouttemporal execution-timeout
Timeout (in seconds) for a WorkflowExecution, including retries and continue-as-new tasks.
Learn more - --fieldstemporal fields
Customize fields to print.
Learn more - --id-reuse-policytemporal id-reuse-policy
Allows the same Workflow Id to be used in a new Workflow Execution.
Learn more - --inputtemporal input
Optional JSON input to provide to the Workflow.
Learn more - --input-filetemporal input-file
Passes optional input for the Workflow from a JSON file.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --max-field-lengthtemporal max-field-length
Maximum length for each attribute field.
Learn more - --memotemporal memo
Set a memo on a schedule (in key=value format).
Learn more - --memo-filetemporal memo-file
Set a memo from a file.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-timeouttemporal run-timeout
Timeout (in seconds) of a single Workflow run.
Learn more - --search-attributetemporal search-attribute
Set Search Attribute on a schedule.
Learn more - --task-queuetemporal task-queue
Task Queue
Learn more - --task-timeouttemporal task-timeout
Start-to-close timeout for a Workflow Task (in seconds).
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --typetemporal type
Search attribute type.
Learn more - --workflow-idtemporal 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
eventEvents reference
Events are created by the Temporal Cluster in response to external occurrences and Commands generated by a Workflow Execution.
Learn more 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.
- --fieldstemporal fields
Customize fields to print.
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --querytemporal query
Visibility Query of Search Attributes describing the Workflow Executions to reset.
Learn more - --reasontemporal reason
Reason for the operation
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal workflow-id
Workflow Id
Learn more - --yestemporal 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.
- --concurrencytemporal concurrency
Request concurrency.
Learn more - --depthtemporal depth
Number of Child Workflows to expand.
Learn more - --fieldstemporal fields
Customize fields to print.
Learn more - --foldtemporal fold
Statuses for which Child Workflows will be folded in (this will reduce the number of information fetched and displayed).
Learn more - --limittemporal limit
Number of items to print.
Learn more - --no-foldtemporal no-fold
Disable folding
Learn more - --no-pagertemporal no-pager
Disables the interactive pager.
Learn more - --outputtemporal output
Output format.
Learn more - --pagertemporal pager
Sets the pager for Temporal CLI to use.
Learn more - --run-idtemporal run-id
Identifies the current Workflow Run.
Learn more - --time-formattemporal time-format
Format time as either relative, iso, raw.
Learn more - --workflow-idtemporal workflow-id
Workflow Id
Learn more