Kill an execution.

This task will kill an execution and optionally propagate the kill to child executions; only the non-terminated executions can be killed.

yaml
type: "io.kestra.plugin.kestra.executions.Kill"

Kill the current execution with propagation to child executions

yaml
id: conditional-kill-flow
namespace: company.team

inputs:
  - id: shouldKill
    type: boolean
    defaults: false

tasks:
  - id: subflow
    type: io.kestra.plugin.core.flow.Subflow
    flowId: child
    namespace: demo
    wait: false
  - id: kill
    type: io.kestra.plugin.kestra.executions.Kill
    runIf: "{{ inputs.shouldKill == true }}"
    executionId: "{{ execution.id }}"
    propagateKill: true
    auth:
      apiToken: "{{ secrets('KESTRA_API_TOKEN') }}"

Kill a specific execution by ID. Use "" to kill the current execution.

yaml
id: kill-specific-execution
namespace: company.team

tasks:
  - id: kill_execution
    type: io.kestra.plugin.kestra.executions.Kill
    executionId: "{{ vars.targetExecutionId }}"
    propagateKill: false
    auth:
      apiToken: "{{ secrets('KESTRA_API_TOKEN') }}"
Properties

The execution ID to kill

The ID of the execution to kill. Use "" to kill the current execution.

Authentication information.

Kestra API URL. If null, uses 'kestra.url' from configuration. If that is also null, defaults to 'http://localhost: 8080'.

Default true

Propagate kill to child executions

Whether to also kill the child executions (subflows) when this execution is killed.

The tenant ID to use for the request, defaults to current tenant.

API token

Password for HTTP basic authentication

Username for HTTP basic authentication