Skip to main content
agentgraph schedule and agentgraph serve turn a DAG YAML into a long-running service. schedule fires the workflow on a cron expression and blocks until you press Ctrl+C. serve starts an HTTP server that runs the workflow when it receives a POST request, and optionally also runs on a cron schedule. Both commands require the serve extras package.
pip install 'dagraph[serve]'

agentgraph schedule

Run a DAG on a repeating cron schedule. Each tick creates a new run with a fresh run ID. If the previous run is still in progress when the next tick fires, that tick is skipped and a warning is logged — runs never overlap.
agentgraph schedule <dag_path> --cron "<expression>" [OPTIONS]

Arguments and flags

dag_path
string
required
Path to the DAG YAML file.
--cron
string
required
5-field cron expression in the format minute hour day month weekday. For example, 0 9 * * 1-5 runs at 09:00 on weekdays.
--input / -i
string
Static inputs passed to every run. Repeat for multiple values. These are the same across all ticks; use a user_input node if you need dynamic values per run.
--runs-dir
string
default:"runs"
Directory where run subdirectories are created.
--backend
string
default:"claude_code"
Executor backend. See agentgraph run for options.
--sandbox
string
Sandbox for exec nodes (inprocess or docker).
--rpm
number
Requests-per-minute cap across all nodes.
--max-concurrent
number
default:"10"
Maximum simultaneous LLM calls per run.

Examples

agentgraph schedule examples/research.yaml \
  --cron "0 9 * * 1-5" \
  --input topic="AI news"

Non-overlapping execution

If a run is still in progress when the next cron tick fires, the scheduler skips that tick and logs a warning:
⚠ cron tick skipped: previous run still in progress (job ...)
This guarantees at most one concurrent execution of your DAG, regardless of how long each run takes.