opschain scheduled-activities update
Included from Basic tier
opschain scheduled-activities update <id> [-f <file.yaml>] [-i key=value ...]
Updates parts of a scheduled workflow, sending only what is supplied
(PATCH /api/scheduled_activities/{id}); unsupplied attributes keep their
stored values. At least one of the two flags must be passed. The id comes
from scheduled-activities list (or the create confirmation line).
The sources overlay in this order:
-f <file.yaml>— the same flat attribute formatscheduled-activities createloads, strictly checked against the same accepted key set. Every attribute in the file is sent.-i/--input(repeatable) — typed input pairs overlaying the file'sinputsobject per key (a repeated key builds a list).
The server re-runs the full create validation over the merged
(stored + supplied) state — schedule shape, cron syntax, workflow and
pinned-version resolution, the pinned-version typed-inputs dry run — and
recomputes the next run whenever a schedule-shaping field
(cron_schedule, run_at, repeat, enabled) moves.
Two replacement semantics to know:
- a supplied
inputsobject (from the file,-i, or both) REPLACES the stored inputs wholesale — there is no per-key merge with the stored object, so send every input the schedule should keep; version: latest(or an explicit null) clears a pinned version back to latest-at-firing.
Only scheduled workflows are writable; addressing a scheduled change is the named decision-048 refusal.
On success:
updated scheduled activity <id> (workflow <code>, next run <timestamp>)
(-o json|yaml prints the updated resource instead). Needs a server
target (--server <url>, OPSCHAIN_SERVER, or the active context).
Flags
| Flag | Meaning |
|---|---|
-f, --file <file> | Flat YAML definition — every attribute in it is sent. |
-i, --input <key=value> | Typed input overlaying the file's inputs object (repeatable; the sent object replaces the stored inputs). |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Scheduled activity updated. |
| 1 | The command failed (activity not found, server refused the update). |
| 2 | Usage error — nothing to send, invalid file, no server target. |
Named errors
nothing to update — pass -f and/or -i— exit 2.run_at cannot be set on a repeating schedule (cron_schedule is set) — supply one or the other— both schedule halves in one edit, exit 2.<file>: unknown scheduled activity attribute(s) <keys> (accepted: …)— the create loader's check, exit 2.Scheduled change writes are not implemented on this server; only scheduled workflows can be written— exit 1.
Examples
opschain scheduled-activities update 01a13c58-… -i environments=dev -i environments=test
# saturday-off.yaml
cron_schedule: "0 2 * * 0"
enabled: false
opschain scheduled-activities update 01a13c58-… -f saturday-off.yaml
See also
opschain docs cli/scheduled-activities-create— the file format and the validation ladder.opschain docs cli/scheduled-activities-show— the stored definition before and after.opschain docs cli/scheduled-activities-delete— removing the schedule.