Schedulers

Schedulers save recurring prompts and execute them on the controller without an open browser or TUI. A schedule contains one or more cron rules, an explicit timezone, a prompt and a target. The original schedule text is retained alongside its normalized rules.

Enter cron rules directly or describe the timing in words, in any language. The normalization operation returns the rules, the time zone and the next runs; review them before saving. Several rules can express separate times or days for the same prompt.

  1. Cron rules (five fields, @daily-style shortcuts, several separated by ;) are validated and used as entered, synchronously, without a model.
  2. Text is interpreted by an isolated automatic Control Room task (below), unless the owner explicitly chose a model gateway interpreter. There is no built-in phrase dictionary: every wording, in every language, goes to the interpreter.

Control Room interpretation

Text interpretation reuses the mechanism of approval policy reviews: Core starts an isolated automatic Control Room task on the administrator's authorized Claude Control Room account and profile, with the host's verified restricted (evidence-only) launch profile. The task's managed MCP access is limited to reading, claiming and answering its own job (GET /v1/schedule-interpretations/:id, POST …/claim, POST …/result); every other operation, including another job's, is refused. The launch prompt names only the job and its operations. The task reads the exact schedule text, the form's time zone and the current time as JSON data; the text is untrusted and never instructions. It returns {"outcome":"schedule","rules":[…],"timeZone":"<IANA>"} or {"outcome":"refused","reason":"…"}. Core validates the answer with the scheduler's own cron grammar and time-zone check, at most 32 rules and a future occurrence; an invalid answer is rejected with its reason and may be corrected at most three times. The saved job prompt, repository contents and project resources are never sent.

The POST answers pending with a normalizationId; poll GET /v1/scheduled-task-normalizations/:normalizationId (the console does this automatically). While waiting, the result reports a stage (queued, starting, interpreting), an optional detail and the deadlineAt when Core stops waiting. One schedule interpretation runs at a time; others wait in order. Queue, launch and answer together must finish within five minutes, otherwise the job fails with a timeout reason and nothing is saved. A typical interpretation takes about 20–60 seconds after it starts (Claude process launch plus three short tool calls); waiting behind another job adds its time.

Each request UUID owns one job and at most one task: repeating the POST returns the same job, and Core never retries a launch silently. After a Core restart a recorded task is reconciled with its existing chat and session; a launch that was interrupted before its session existed is reported as failed (“not relaunched”), never started again. A task whose process stopped before answering fails the same way. Finished task chats are retired with the other completed Control Room tasks after the idle grace.

When Control Room cannot interpret text, the result is blocked with a specific reason and what to do, plus the cron fallback: Control Room not configured or not running, no active administrator, the Control Room host offline or its host agent too old for restricted tasks, the Control Room account out of quota or signed out, a Codex-only Control Room, several Claude accounts or execution modes authorized (chats on one account that differ only by model are resolved as for policy reviews), or an account restriction of the schedule's owner or target that excludes the Control Room account (the text is then not sent). POST /v1/scheduled-tasks/options reports the same real availability in normalization (available, reason, interpreter).

Optional model gateway interpreter

An owner may instead opt in to one direct, tool-free model API call through one of their model gateway accounts (a Claude or Codex account bound to OpenRouter, Vercel AI Gateway, LiteLLM, Cloudflare AI Gateway, Requesty or Portkey), for example when no Control Room is available to them. It is used only when chosen explicitly: the request's interpreter ({accountId, model}), else the owner's saved setting (GET/PUT /v1/scheduled-tasks/interpreter, {"interpreter": {"accountId": "...", "model": null}}; {"interpreter": null} returns to Control Room). A configured gateway account is never chosen automatically. model: null uses the account's cheapest small allowed model. This call answers synchronously; the schedule text is sent only as JSON data in the user message, and the answer must be exactly {"rules": [...], "timeZone": "<IANA>"} with the same validation. It has a 30-second timeout and no retry, uses the account's allowed models, monthly budget and administrator account locks, and records usage under scheduled-task-interpreter. An account with a proxy/VPN network route is not used. Decisions API providers answer only predicate/choice questions and are not used to write cron rules.

Targets are a new managed session, the authorized sessions of a repository or Project, or an explicit set of sessions. Session target choices are grouped by project, running sessions before frozen ones, and ended sessions are hidden. A scheduled run against a frozen session thaws it, waits until it is ready and then delivers the prompt; quota and thaw failures are reported separately. For a new session, choose its model and effort. An optional existing Project context supplies the real managed launch context, including its accounts, networking, ingress, services, resources and private files.

The controller derives the owner from authentication and checks team membership. A user cannot select another execution identity in the request body. Lists, normalization, edits, run history, results and token statistics remain within the caller's current permissions. Selecting all sessions means the authorized subset, not every session on the server.

Every execution checks the creator's current membership and target permissions again. Saving a schedule does not preserve access that is later revoked. A Project context does not elevate privileges: the current account restrictions, network and ingress policy, service grants, resource limits and private-file permissions also apply when the new session starts.

Use the scoped list to inspect saved tasks, edit or delete one task, and enable or disable future runs. Read bounded run history for actual dispatch, execution, results and reported token usage. An accepted dispatch is distinct from a completed answer. Unavailable or incomplete usage remains unknown rather than being reported as zero. Disabling future runs does not establish that previously accepted work has stopped; inspect its run state.

Run now

POST /v1/scheduled-tasks/:id/run-now with {"clientRequestId":"<UUID>","revision":N} runs one enabled task once, immediately, without waiting for its next slot. The controller records a run marked "trigger": "manual" and the engine admits it on its next one-second tick through the same path as a timed slot: the creator's current membership, target permissions and authorization revision are checked again, the authorized targets are resolved and sealed before the first effect, new sessions launch and existing sessions receive the idle-only notice with the same delivery receipts, and the run, its results and its token observations appear in the same run history and statistics. The task's next timed slot is neither moved nor skipped; only the displayed last run time changes.

The list can also contain owner-only unavailableItems after access changes. These retain only safe task identity, name, revision, enabled state and a reason. They allow the owner to disable future work or delete the exact revision; they do not restore target details, history, results or usage access. Do not reconstruct that information from an earlier listing.

A coalesced blocked run records slotCount and its first/last scheduled times as a range. It does not enumerate every missed timestamp or prove a separate dispatch for each slot.

An authorized Control Room discovers the /v1/scheduled-tasks operations (including the interpreter setting) and /v1/scheduled-task-normalizations status operations through control_operations and calls their published schemas with control_request. An operator can also inspect devctl api operations scheduled-task and use devctl api call. The devctl schedules commands provide scoped owner CLI access; an authorized Control Room can use its existing native MCP transport. These commands do not accept a user identity override. The existing devctl scheduler explain command continues to explain placement decisions.

CLI command Purpose
schedules list --limit 20 --after CURSOR Read one visible page and retain its continuation.
schedules options --account-id ACCOUNT --host-id HOST --project-context-id PROJECT Read authorized target choices and the current model/effort catalog for that context.
schedules target-options --file target.json Read target choices and text availability for the full target set.
schedules normalize --file timing.json Convert {kind,input,timeZone,target} to rules for the exact authorized target.
schedules normalization NORMALIZATION Read the result of one owned interpretation.
schedules normalization-request REQUEST_UUID Recover an owned interpretation result after a lost response using GET only.
schedules interpreter Read the optional saved gateway interpreter and the gateway accounts.
schedules interpreter-set --account ACCOUNT --model MODEL Opt in to a gateway interpreter (omit --model for its cheapest small model).
schedules interpreter-clear Remove the gateway interpreter; Control Room interprets text again.
schedules create --file task.json Create a task with its prompt, schedule and target.
schedules show TASK Read the current task and revision.
schedules update TASK --file changes.json Apply changes with the saved numeric revision in the JSON body.
schedules enable TASK --revision N Enable future runs at that revision.
schedules disable TASK --revision N Disable future runs at that revision.
schedules run-now TASK --request-id UUID --revision N Run an enabled task once now; repeating the same UUID returns the same run.
schedules delete TASK --revision N Delete the exact current task revision.
schedules history TASK --limit 20 --after CURSOR Read a bounded page of runs.
schedules result TASK RUN Read one run and its actual results.
schedules stats TASK Read reported token statistics and incomplete usage.

Prefix each command with devctl. List filters include --project, --group-id, --session and --enabled true|false. A filter narrows the authorized view; it does not select an execution identity. Create and update JSON use the published shared API schemas. Their targets are:

target.kind Target fields
new-session provider, accountId, hostId, model, effort, and nullable projectContextId for an existing Project.

A new session can use any agent provider whose installed client supports a verified initial prompt (Claude, Codex, and optional clients that declare context handoff, currently PI and Antigravity); the prompt is delivered as that launch's initial prompt. A reasoning effort applies only to Claude and Codex. Existing sessions (sessions, repository-sessions, project-sessions) receive the prompt as a factual session notice, whose idle check and delivery receipt are verified for Claude and Codex sessions only; sessions of other clients are not eligible targets. | repository-sessions | projectId for the authorized repository's sessions. | | project-sessions | groupId for the authorized Project group's sessions. | | sessions | sessionIds containing the explicitly selected authorized sessions. |

Normalization accepts, for example, {"kind":"cron","input":"0 9 * * 1-5","timeZone":"Europe/Madrid","target":{"kind":"repository-sessions","projectId":"repository-a"}}, using an actual authorized repository ID. Its completed result contains schedule with the retained input and normalized rules, plus nextRuns. A create body adds name, prompt and the same target to that schedule; enabled is optional. Preserve all returned schedule fields, including any normalizationId, rather than dropping additional rules or inventing a binding. Natural-language normalization is bound to its owner and target context. A changed target requires a matching current normalization; a receipt for another owner, account or Project is not reusable. Target choices and task revisions are checked by the server when the command is submitted and when execution begins.

Each text normalization has a stable UUID clientRequestId. Set it in the input or pass --request-id UUID. If omitted, the CLI generates one UUID for that explicit invocation and prints it to stderr before sending the request. A Control Room interpretation answers pending; poll devctl schedules normalization NORMALIZATION until it is completed, failed or blocked. A gateway interpretation normally answers at once. The same UUID and same input refer to the same intent and never start a second task or model call; a different input or interpreter with that UUID conflicts. The CLI never retries a normalization POST. After a lost response, run devctl schedules normalization-request REQUEST_UUID, which uses GET /v1/scheduled-task-normalizations/by-request/:clientRequestId; it never repeats the work. A gateway call interrupted by a controller restart is reported as failed with an unknown outcome and is not retried.

Choose a gateway interpreter for one request with --interpreter-account ACCOUNT and optional --interpreter-model MODEL, or the equivalent interpreter JSON object. It does not change the model selected for the eventual scheduled task. Older clients may still send hostId and effort in interpreter; they are ignored.

schedules run-now accepts --request-id UUID; if omitted, the CLI generates one and prints it to stderr before sending the request, and never retries the POST. After a lost response, run the same command with that --request-id to receive the same run; it never starts a second one. --revision N is optional. Follow the run with devctl schedules result TASK RUN. Control Room and MCP clients use the typed run_schedule_now tool, which requires clientRequestId.

After a timeout or lost response, inspect the existing task or run before repeating a mutation. A transport acknowledgement, queued run or notice is not proof that the prompt finished or that its requested effects occurred.