Skip to main content

Temporal CLI batch command reference

Batch commands allow you to change multiple 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
in the background. In order to do this, you provide the command with a List Filter 🔗
What is a List Filter?
A List Filter is the SQL-like string that is provided as the parameter to an advanced Visibility List API.
term explanation filtered-lists visibility
and the type of Batch job to execute.

The List Filter identifies the Workflow Executions that will be affected by the Batch job. The Batch type determines the other parameters that need to be provided, along with what is being affected on the Workflow Executions.

There are three types of Batch Jobs:

  • Signal: sends a Signal 🔗
    What is a Signal?
    A Signal is an asynchronous request to a Workflow Execution.
    term signals explanation
    to the Workflow Executions specified by the List Filter.
  • Cancel: cancels the Workflow Executions specified by the List Filter.
  • Terminate: terminates the Workflow Executions specified by the List Filter.

A successfully started Batch job will return a Job ID. Use this Job ID to execute other actions on the Batch job.

list

When used, temporal batch list returns all Batch jobs. Batch Jobs can be returned for an entire Cluster or a single Namespace. temporal batch list --namespace=MyNamespace

Use the command options listed below to change the information returned by 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

describe

The temporal batch describe command shows the progress of an ongoing Batch job.

Pass a valid Job ID to return a Batch Job's information. temporal batch describe --jobid=MyJobId

Use the command options listed below to change the information returned by this command.

  • --fields 🔗

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

  • --job-id 🔗

    temporal job-id
    Batch Job Id
    cli reference temporal cli options-feature command-line-interface-cli batch job job id

  • --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

terminate

The temporal batch terminate command terminates a Batch job with the provided Job ID. A reason for terminating the Batch Job can also be provided for future reference.

temporal batch terminate --job-id=MyJobId --reason=JobReason

Use the command options listed 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

  • --job-id 🔗

    temporal job-id
    Batch Job Id
    cli reference temporal cli options-feature command-line-interface-cli batch job job id

  • --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

  • --reason 🔗

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

  • --time-format 🔗

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