Cli referenceScheduler
agh scheduler drain
Pause dispatch and wait for active task claims to finish
- Audience
- Operators running durable agent work
- Focus
- Scheduler guidance shaped for scanability, day-two clarity, and operator context.
agh scheduler drain
Pause dispatch and wait for active task claims to finish
agh scheduler drain [flags]Examples
# Drain active claims with the default timeout
agh scheduler drain
# Return immediately after pausing dispatch
agh scheduler drain --timeout 0sOptions
-h, --help help for drain
--reason string Optional scheduler drain reason
--timeout string Drain wait timeout as a duration; 0s returns immediately (default "60s")Options inherited from parent commands
--json Emit JSON output
-o, --output string Output format: human, json, jsonl, or toon (default "human")Output Formats
Every AGH command supports -o, --output:
humanfor interactive terminal usejsonfor scripts and other machine-readable consumersjsonlfor wait or streaming commands that emit one JSON record per linetoonfor compact agent-readable summaries
Example:
agh scheduler drain -o json