Compute · Commands
div stop
Stop a run and print what it cost.
Synopsis
div stop <run> [flags]
Stops the run, marks it canceled, and prints its duration and final cost.
Arguments
| Argument | Description |
|---|---|
<run> |
Run name or ID. One run per call. |
Flags
| Flag | Description | Default |
|---|---|---|
--json |
Print the stopped run as JSON. | |
--token <key> |
API key to use. | see Configuration |
--api-url <url> |
API URL to use. | see Configuration |
Behavior
- The printed cost is final. Runs are billed per minute with a one-minute minimum, so a run stopped in its first minute is billed for one minute.
- The run’s log stays available through
div logs. Files the run wrote to a volume stay on the volume. - If the run has already finished,
div stopchanges nothing, prints how the run ended, and exits0.
Output
run-7 was canceled after 4m 0s, $0.33 spent
Exit codes
| Code | Meaning |
|---|---|
0 |
The run was stopped, or had already finished. |
1 |
The API rejected the request. |
2 |
Invalid arguments. |
Examples
div stop run-7
div stop run-7 --json
div runs --status active --project lora-sweep | cut -d' ' -f1 | xargs -n1 div stop