🚀 New! Kestra raises $3 million to grow Learn more

Pause Pause

yaml
type: "io.kestra.core.tasks.flows.Pause"

Pause the current execution and wait for a manual approval (either by humans or other automated processes). All tasks downstream from the Pause task will be put on hold until the execution is manually resumed from the UI. The Execution will be in a Paused state (marked in purple) and you can manually resume it by clicking on the "Resume" button in the UI, or by calling the POST API endpoint "/api/v1/executions/{executionId}/resume". The execution can also be resumed automatically after a timeout.

Examples

yaml
id: human_in_the_loop
namespace: dev

tasks:
  - id: before_approval
    type: io.kestra.core.tasks.debugs.Return
    format: Output data that needs to be validated by a human

  - id: pause
    type: io.kestra.core.tasks.flows.Pause
    tasks:
      - id: run_post_approval
        type: io.kestra.plugin.scripts.shell.Commands
        runner: PROCESS
        commands:
          - echo "Manual approval received! Continuing the execution..."

  - id: post_resume
    type: io.kestra.core.tasks.debugs.Return
    format: "{{ task.id }} started on {{ taskrun.startDate }} after the Pause"

Properties

tasks

delay

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

Duration of the pause — useful if you want to pause the execution for a fixed amount of time. If no delay and no timeout are configured, the execution will never end until it's manually resumed from the UI or API.

errors

List of tasks to run if any tasks failed on this FlowableTask.

timeout

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

Timeout of the pause — useful to avoid never-ending workflows in a human-in-the-loop scenario. For example, if you want to pause the execution until a human validates some data generated in a previous task, you can set a timeout of e.g. 24 hours. If no manual approval happens within 24 hours, the execution will automatically resume without a prior data validation. If no delay and no timeout are configured, the execution will never end until it's manually resumed from the UI or API.