Parallel
This flow will run three parallel tasks based on the concurrent
property and will start the last
task at the end.
yaml
id: parallel
namespace: io.kestra.demo
description: |
This flow will run 3 parallel tasks based on the `concurrent` property and will start the `last` task at the end.
tasks:
- id: parent
type: io.kestra.core.tasks.flows.Parallel
concurrent: 3
tasks:
- id: t1
type: io.kestra.core.tasks.scripts.Bash
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: t2
type: io.kestra.core.tasks.scripts.Bash
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: t3
type: io.kestra.core.tasks.scripts.Bash
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: t4
type: io.kestra.core.tasks.scripts.Bash
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: t5
type: io.kestra.core.tasks.scripts.Bash
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: t6
type: io.kestra.core.tasks.scripts.Bash
commands:
- 'echo "running {{task.id}}"'
- 'sleep 1'
- id: last
type: io.kestra.core.tasks.debugs.Return
format: "{{task.id}} > {{taskrun.startDate}}"