v1.3.11

Automation Endpoints

Last updated


Endpoints for scheduled runs.
Cron entries and one-off tasks are one surface. The separate /v1/cron* and /v1/task* endpoints were replaced by /v1/schedule in v0.33.6, with type=cron|task selecting between them.
MethodPathDescription
GET/v1/schedulelocal — list cron entries and one-off tasks as one schedules array, each tagged type=cron|task; ?type= narrows to one
GET/v1/schedule/*skilllocal — read a scheduler skill (404 when missing): name (also echoed as skill) plus body, which since v1.0.2 is the raw SKILL.md including its frontmatter rather than the parsed-off body. files carries the skill's scripts/ references/ assets/ contents on the same terms as GET /v1/skill/*name. The description field was removed
POST PATCH/v1/schedulelocal — {type, name, content, expressions, session_id?}. Creates (POST, 409 when the name is taken) or updates (PATCH, 404 when missing) a scheduler skill and rebind its whole entry set to type=cron|task; switching type drops the entries the skill held under the other one. description was removed in v1.0.2. A content that already opens with its own --- frontmatter is written verbatim; otherwise the server composes a minimal ---\nname: <name>\n--- header. name is 1-64 characters of A-Z a-z 0-9 _ -. expressions (at least one) are cron expressions for cron and future times for task (+<duration>, YYYY-MM-DD HH:MM, RFC 3339, or HH:MM today). session_id defaults to the session the skill already runs in, else a new chat- session. Returns {type, name, session_id}
DELETE/v1/schedulelocal — {skill, type?}. Deletes a skill's entries (type narrows to one, omitted removes both) and trashes the skill when nothing else binds it; returns {ok, removed, trashed}, 404 when nothing was removed
POST/v1/schedule/runlocal — {session_id, skill}, both required. Fires a schedule now and returns 202 {ok, started:true} without waiting for the run
中文