Core Plugins and tasks Parallel

Core Plugins and tasks Parallel

Certified

Run child tasks in parallel.

Starts all child tasks concurrently, bounded by concurrent if set (0 = no cap). Each branch can contain its own sequences or nested flows.

Use when independent steps can run at the same time to shorten wall-clock duration.

yaml
type: io.kestra.plugin.core.flow.Parallel

Run tasks in parallel

yaml
id: parallel
namespace: company.team

tasks:
  - id: parallel
    type: io.kestra.plugin.core.flow.Parallel
    tasks:
      - id: 1st
        type: io.kestra.plugin.core.debug.Return
        format: "{{ task.id }} > {{ taskrun.startDate }}"

      - id: 2nd
        type: io.kestra.plugin.core.debug.Return
        format: "{{ task.id }} > {{ taskrun.id }}"

  - id: last
    type: io.kestra.plugin.core.debug.Return
    format: "{{ task.id }} > {{ taskrun.startDate }}"

Run two sequences in parallel

yaml
id: parallel_sequences
namespace: company.team

tasks:
  - id: parallel
    type: io.kestra.plugin.core.flow.Parallel
    tasks:
      - id: sequence1
        type: io.kestra.plugin.core.flow.Sequential
        tasks:
          - id: task1
            type: io.kestra.plugin.core.debug.Return
            format: "{{ task.id }}"

          - id: task2
            type: io.kestra.plugin.core.debug.Return
            format: "{{ task.id }}"

      - id: sequence2
        type: io.kestra.plugin.core.flow.Sequential
        tasks:
          - id: task3
            type: io.kestra.plugin.core.debug.Return
            format: "{{ task.id }}"

          - id: task4
            type: io.kestra.plugin.core.debug.Return
            format: "{{ task.id }}"
Properties
Min items1
Default0

Number of concurrent parallel tasks that can be running at any point in time

If the value is 0, no limit exist and all tasks will start at the same time.

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

Reference (ref) of the pluginDefaults to apply to this task.