Core Concepts
A workflow is a YAML file that lists steps and the order they run in. Each time it starts, Dagu creates a run with its own ID, status, logs, and outputs, and keeps all of it in files. This page explains those pieces and the processes that execute them.
| Term | Meaning |
|---|---|
| DAG | A workflow defined in one YAML file. Its name is the file name without .yaml, unless name: sets one. |
| Step | One unit of work: a shell command (run:) or a built-in action (action: with with: inputs). |
| Dependency | depends: on a step. The step starts after the steps it names succeed. |
| Run | One execution of a DAG, with a run ID, a status, a log per step, and outputs. Also called a DAG run. |
| Attempt | One try of a run. dagu retry adds an attempt under the same run ID. |
| Schedule | Cron expressions in schedule: that start runs automatically. |
| Queue | Holds runs that wait for a free slot before they start. |
DAGs and Steps
DAG stands for directed acyclic graph: steps point to the steps they depend on, and the dependencies cannot form a loop. This DAG extracts data, then transforms and validates it in parallel, then loads it:
# etl-daily.yaml
schedule: "0 2 * * *"
steps:
- id: extract
run: printf 'rows=%s\n' 1200 >> "$DAGU_OUTPUT_FILE"
outputs:
- name: rows
- id: transform
run: echo "transforming ${steps.extract.outputs.rows} rows"
depends: extract
- id: validate
run: echo "checking the schema"
depends: extract
- id: load
run: echo "loading the warehouse"
depends: [transform, validate]- Order comes from
depends. Steps withoutdependsstart at once, in parallel. Settype: chainat the top of the file to run steps one after another in file order instead. - Steps pass data through outputs.
extractwritesrows=1200to$DAGU_OUTPUT_FILE, andtransformreads it as${steps.extract.outputs.rows}. See Outputs. - A step runs a command or an action.
run:executes a shell command.action:calls a built-in action, such as an HTTP request, a container, or an SSH command:
steps:
- id: health_check
action: http.request
with:
method: GET
url: https://example.com/healthBuilt-in actions are listed under Actions. Lifecycle handlers (handler_on:) run extra steps when a run succeeds, fails, or exits. See Lifecycle Handlers.
Runs
A run starts in one of these ways, and each one records its trigger:
| Trigger | How it starts a run |
|---|---|
| CLI | dagu start etl-daily.yaml runs it in the foreground. dagu enqueue adds it to a queue. |
| Web UI and REST API | The Start button, or POST /api/v1/dags/{name}/start |
| Schedule | A schedule: cron expression, while the scheduler runs |
| Webhook | An HTTP request to the DAG's webhook |
| Watched folder | A file arriving in a watched folder |
| Sub-DAG | A step in a parent DAG calls it. See Sub-DAGs. |
A run moves through these statuses:
| Status | Meaning |
|---|---|
not_started | The DAG has no run yet. |
queued | The run waits in a queue for a free slot. |
running | Steps are executing. |
waiting | A step waits for a person to approve it or complete a human task. |
succeeded | Every step finished successfully. |
partially_succeeded | A step failed, continue_on let the run go on, and the rest finished. |
failed | A step failed and stopped the run. |
aborted | Someone stopped the run, for example with dagu stop or the Stop button. |
rejected | A person rejected a waiting step. |
succeeded, partially_succeeded, failed, aborted, and rejected are final. dagu retry reruns a finished run under the same run ID as a new attempt, and dagu restart starts a running DAG again with a new run ID. See the CLI Reference.
Step Lifecycle
Each step has its own status. A step starts when every step it depends on has finished successfully:
| Step status | Meaning |
|---|---|
not_started | The step waits for its dependencies. |
running | The command or action is executing. |
retrying | The step failed and waits for its next retry_policy attempt. |
waiting | The step waits for a person's approval or input. |
succeeded | The step finished with exit code 0, or the action succeeded. |
partially_succeeded | Some of the step's own work failed, such as some items of a loop or some runs of a sub-DAG. |
failed | The command exited non-zero or the action failed. |
aborted | The step was stopped, or did not run because a step it depends on failed. |
skipped | A precondition was not met, so the step did not run. |
rejected | A person rejected the step. |
In the Web UI, each step's color shows its status. In this run, render failed, so send never ran and shows as aborted; archive was skipped by its precondition; cleanup succeeded; and the onFailure handler ran:
Processes
One dagu binary provides every process. A run started from the CLI executes in the dagu start process itself, and the server and the scheduler start each run as its own dagu start process. In distributed mode they hand runs to the coordinator instead, which passes them to workers and records what the workers report. Every process keeps state in files under DAGU_HOME; there is no database or message broker.
| Process | Command | Role |
|---|---|---|
| Server | dagu server | Serves the Web UI, the REST API, and the MCP endpoint on port 8080. |
| Scheduler | dagu scheduler | Starts runs when schedules fire, and starts queued runs as slots free up. |
| Coordinator | dagu coordinator | gRPC service on port 50055 that hands runs to workers. |
| Worker | dagu worker | Polls the coordinator, executes runs on its machine, and reports status and logs back. |
dagu start-all runs the server, the scheduler, and the coordinator in one process. Set DAGU_COORDINATOR_ENABLED=false to leave the coordinator out. A single machine needs nothing else. To spread runs across machines, see Deployment Models and Architecture.
Related
- Quickstart: run a first workflow end to end
- Writing Workflows: the full YAML surface
- CLI Reference: every command and flag
- Deployment Models: one server, temporary workers, or distributed workers



