43 lines
2.5 KiB
Markdown
43 lines
2.5 KiB
Markdown
# Independent saved run schedules
|
|
|
|
A schedule is not part of a workflow. It pairs an explicit pipeline ID/version
|
|
with run information (`input.prompt`, server `workspace`, optional model/stage
|
|
overrides, title, notifications, output format, and `write_paths`) and a timer.
|
|
One generic research workflow can have many topics/prompts on different timers.
|
|
Scheduling an existing workflow never authorizes creating/editing/publishing a
|
|
workflow or altering its permissions. Ask before enabling unattended runs unless
|
|
the user already requested that schedule.
|
|
|
|
The web app exposes **Pipeline → Schedules → Add schedule** and **Schedule this
|
|
run**. The latter copies original input/options, not output, and preserves
|
|
run-level write restrictions. Publishing a workflow creates no timer.
|
|
|
|
All scheduling commands use the existing JSON envelope through `pipelines rpc -`:
|
|
|
|
- `list_schedules` with optional `pipeline_id` → `schedules`.
|
|
- `save_schedule` with a full `schedule` object → `schedule`. Omitted/zero ID and
|
|
revision create; edits require the returned positive `id` and current
|
|
`revision`. The record contains `name`, `pipeline_id`, `version`, `enabled`,
|
|
`input`, `workspace`, and `rule`.
|
|
- `delete_schedule` with `schedule_id` and `expected_revision` removes future
|
|
occurrences only. History and already admitted/running work are retained.
|
|
|
|
For creates, use a new top-level `request_key` for each intentional schedule and
|
|
reuse it only to retry that same creation after a lost response. A conflicting
|
|
payload fails; retrying a deleted creation cannot resurrect it. On revision
|
|
conflict, reload and reconcile—never force-overwrite somebody else's changes.
|
|
|
|
`rule` uses exactly one of `{"every":"24h"}` or
|
|
`{"times":["09:00","17:30"]}`, optionally `days` (`sun` through `sat`, omit for
|
|
everyday) and `timezone` (IANA, `UTC`, or server-local `Local`/omitted). Intervals
|
|
are at least one minute. Workspace is an existing absolute directory on the
|
|
execution server, not the browser/client's filesystem. Validate run/model options
|
|
against the pinned workflow; unavailable providers still need runtime checks.
|
|
|
|
**Pipelines → Has schedules** includes configured paused schedules.
|
|
**Runs → Scheduled runs** means a real timer-triggered execution, not a manual
|
|
run of a pipeline that happens to have schedules. Provenance stays after pause or
|
|
deletion. Missed occurrences are skipped, not replayed; overlapping workspace
|
|
execution is refused and recorded. Do not add recovery workflows or rerun work
|
|
merely because a timer's dispatch was skipped.
|