Skip to content
Cli referenceScheduler
AGH RuntimeScheduler

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 0s

Options

  -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:

  • human for interactive terminal use
  • json for scripts and other machine-readable consumers
  • jsonl for wait or streaming commands that emit one JSON record per line
  • toon for compact agent-readable summaries

Example:

agh scheduler drain -o json

On this page