div stop
Stops a run, settles what it owes to the minute, and prints what it spent. Its log and its files stay.
div stop run-7
div stop run-7 --json
run-7 was canceled after 4m 0s, $0.33 spent
div stop stops the container, settles the meter, and marks the run canceled, all before it answers. The figure it prints is the final one. The run’s log stays readable with div logs, and anything the run wrote to a volume stays on the volume.
A run is metered by the minute with a one-minute floor, so a run stopped in its first minute is charged for one minute.
A run that has already finished
div stop leaves it alone, says how it ended, and exits 0:
nothing to stop: run-7 finished in 12m 40s and spent $1.05
The exit code answers whether the run is still holding hardware, and it is not. A script can call div stop without first checking whether the run finished on its own.
Flags
| Flag | What it does |
|---|---|
--json |
print the run as it stopped, as the API sent it |
Several at once
div stop takes one run. For more than one, pipe div runs into it:
div runs --status active --project lora-sweep | cut -d' ' -f1 | xargs -n1 div stop