Cancel a schedule
Stops the clock firing this schedule. This is a cancel, not a destroy: the row stays readable here and in the listing, carrying every fire it made and every refusal it recorded, because the sessions it created are read backwards from it. It is ONE WAY, and nothing here undoes it — a schedule that should run again is created again, with a new id. Cancelling a schedule that is already cancelled is not an error: the state asked for holds. A fire already in flight is not recalled; what stops is every fire after it.
Path Parameters
The schedule's id.
Response
The schedule, cancelled and still readable.
Work the host's own clock starts, with nobody present. A schedule is durable configuration, never swept: what a fire produces is a session, governed by the rules sessions already have, while the schedule itself stays until somebody cancels it. The owner is written from the host's own identity and is never something a caller names — a fire has to be attributable to somebody who is not there, and an attribution the reader cannot check reads exactly like a true one.
Who this schedule's fires are billed to and attributed to.
The directory a fired session runs in. Somebody has vouched for it — creation refuses one nobody has — and the host reads that answer again at every fire, because trust is revocable.
What the fired session is asked to do.
When a schedule fires: a kind and the one parameter that kind takes. Exactly one parameter is ever set. There is no cron expression here and the absence is a decision, not a gap: a cron expression drags a timezone, a daylight-saving policy and a no-match semantics behind it, and an agent turn costs money and takes minutes, so the units that matter are hours and days.
active fires; completed is what a single-instant schedule becomes once that instant is spent; cancelled is what a person does to one, and it stops the fires without removing the record; paused keeps the row and stops the fires, which is the difference between changing your mind and changing it back.
active, paused, completed, cancelled What ONE fire may spend. A hard stop on the turn rather than a price — see setScheduleBudget for what it does and does not bound. Zero means this schedule does not fire.
x >= 0How many instants this schedule has CLAIMED, including fires that never reached a session. The count is incremented inside the same transaction that spends the instant, which is what makes a fire unrepeatable across a crash — so a fire refused after the claim, or a host that died in the gap before the session existed, is counted here and explained in lastError. A consumer counting SESSIONS wants the sessions themselves, not this.
x >= 0The agent recipe a fire runs under. Absent runs the host's default.
The instant a fire is owed at. Absent once a single instant has been spent. A cancelled schedule KEEPS the instant it was going to run at — its status is what stops the fire, and the instant is what somebody reads when they wonder whether they stopped the right one. It is advanced from the moment of the fire rather than from the instant that was missed, which is why a host that was off for three days fires once rather than three times.
When this schedule last CLAIMED an instant. Absent until it has. It is stamped at the claim, before the fire's session exists, so it says when the host last acted on this schedule rather than when work last started: a fire refused for a missing repository or an unpriceable model moves it too, and lastError says which.
The session the last fire created, which is where the morning's reading starts. It may name a session that has since been purged.
When a due fire was refused, with lastSkipReason saying which refusal it was. Recorded rather than silent: a skip nobody can read is indistinguishable from a scheduler that stopped working. Written once while the refusal lasts, so it answers "since when", and cleared by any fire that gets through.
How a fire that had already claimed its instant failed to reach a session. The instant stays spent, so this is what the morning reads instead of an unexplained gap.

