A routine is a YAML object inside theDocumentation Index
Fetch the complete documentation index at: https://docs.rundock.ai/llms.txt
Use this file to discover all available pages before exploring further.
routines: array on an agent’s frontmatter. This page documents every field, every supported schedule pattern, and the limits that shape what kinds of routine actually work.
For the concept, see Routines. For a walkthrough, see Set up a routine.
Where routines live
Every routine is declared on the agent it runs for. Inside the agent file’s frontmatter:routines: array is read by Rundock’s scheduler and ignored by Claude Code. An agent file with routines works in plain Claude Code; the routines simply do not run there.
Frontmatter fields
Each entry in theroutines: array is a YAML object with four fields.
| Field | Type | Required | Purpose |
|---|---|---|---|
name | string | Yes | Display name for the routine. Shown in the routines panel, on the agent profile, and in the scheduler logs. A routine without a name is dropped during parse. |
schedule | string | Yes | When the routine runs. Accepts only the human-readable forms documented below. The scheduler ignores routines with an unrecognised schedule (silent fail). |
prompt | string | Yes | The instruction sent to the agent when the routine fires. Treated as a single user message: the same text the user would type. |
description | string | No | One-line plain English explanation, surfaced on the agent profile. Optional: omitting it does not break the routine. |
routines block is Rundock-only. Other tools that read agent frontmatter ignore it.
Schedule format
Theschedule field accepts only two patterns. Both are exact regex matches.
| Pattern | Format | Notes |
|---|---|---|
| Daily | every day at HH:MM | Hour and minute must be two-digit, zero-padded. 09:00 works; 9:00 does not match. |
| Weekly | every <weekday> at HH:MM | Weekday must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. Lowercase, full word. Two-digit zero-padded time. |
Examples that work
Examples that look correct but never fire
Timezone
The schedule is interpreted in the local timezone of the machine running Rundock. There is no timezone field on a routine. If you run Rundock on a VPS in a different timezone from where you live, set the schedule for the VPS’s local time, not yours.Scheduler behaviour
The scheduler ticks every 60 seconds. On each tick:- Rundock re-discovers all agents (this picks up routine changes without a restart).
- For every routine on every agent, the scheduler computes the next run time.
- If the next run time has come due, Rundock fires the routine.
lastRun guard. Daily routines do not re-fire the same calendar day. Weekly routines do not re-fire on the same weekday they last ran on. The guard is held in memory on the server.
When a routine fires, Rundock spawns a headless Claude Code subprocess with the routine’s prompt as the input message. The subprocess runs with --dangerously-skip-permissions because there is no user available to approve tool calls in real time.
lastRun is in-memory. When Rundock restarts, the guard is wiped. If a routine fired earlier in the day and Rundock restarts before the next tick rolls past midnight, the daily-schedule branch may fire the routine a second time when it would otherwise be suppressed. Rarely matters in practice (most morning briefings are idempotent), but worth knowing.Routines fire only while Rundock is running
This is the central limit and it shapes everything else. Two practical paths around this:- Run Rundock on a small VPS so the scheduler ticks 24/7. Reach it from any device through a browser.
- Use Anthropic’s Claude Code Routines, Anthropic’s managed scheduling layer, for repo-bound work that can run on their cloud.
Where routine output goes
When a routine fires, the spawned Claude Code subprocess produces output on stdout (stream-json) and stderr. What Rundock records:- The routine’s
lastRuntimestamp. - The routine’s
status(running,completed, orfailed, based on the subprocess exit code). - The routine’s
durationin seconds.
The routines panel
The routines panel sits at the bottom of the left sidebar, beneath the team list and the platform agent list. It is workspace-level: routines from every agent in the workspace are aggregated into one flat list. Each row shows three things:- The owning agent’s avatar (icon and colour from the agent’s frontmatter).
- The routine’s
name. - A short formatted schedule:
5:00 AMfor daily,Fri 4:00 AMfor weekly.
Running... indicator in the workspace’s working colour.
The panel is display-only. Routine rows are not clickable. There is no per-routine enable or disable toggle and no delete control. To pause a routine without deleting it, comment it out (or remove it) from the agent’s frontmatter; Rundock picks up the change on the next scheduler tick.
name, the raw schedule string, and a status line: Last run: <relative time> (<status>) once a run has occurred, or Not yet run before the first run.
Complete worked example
Here is a complete agent file with a single routine. Every field is present.- The schedule uses the daily form, two-digit zero-padded.
- The prompt is short. It assumes the agent’s body knows what “the morning briefing” means.
- The description appears on the profile under the routines card. It does not affect the scheduler.
Common patterns
Five recipes that work in practice.Morning briefing on the orchestrator
End-of-day sync
Weekly research digest
Weekly digest on a different day to avoid collisions
Multiple routines on one agent, staggered
Common pitfalls
Cron expressions silently never fire. The scheduler does not understand cron. A routine withschedule: 0 5 * * * parses fine, registers fine, and never runs. There is no error, no warning, no log line. If a routine appears to do nothing, the schedule string is the first thing to check.
Hours without a leading zero never fire. The pattern is exact. every day at 9:00 does not match. Always zero-pad.
Capitalised weekdays never fire. The schedule string is lowercased before matching, so every Friday at 04:00 works in practice. But the parser only matches one full lowercased weekday word. every Fri at 04:00, every Mon-Fri at 09:00, and every weekday at 18:00 do not match.
Rundock is closed when the schedule comes due. The scheduler is in-process. There is no catch-up. Routines are best suited to cadences the user keeps Rundock running through. For routines that must never miss a slot, host Rundock on a VPS or schedule them when Rundock is reliably open.
Routines that need their output read. Rundock does not capture stdout. If the agent does not write its output somewhere durable through tools, the run produces nothing the user can find later. Always design routines so the agent writes a trace.
Two routines on the same agent fire in the same minute. Both spawn Claude Code subprocesses concurrently. They do not share context or file locks. Stagger the schedules unless the routines are genuinely independent and idempotent.
Routine name changed after first run. The routine’s lastRun guard is keyed on agentId:name. Renaming a routine creates a new key, which means the new name has no run history and may fire immediately on the next tick if its schedule has already passed. To rename a routine without an immediate re-fire, do it just after a known successful run rather than just before the next due time.
Where to next
Routines concept
What routines are, what they are good for, and the limits worth knowing.
Set up a routine
A walkthrough of adding a routine to an agent and confirming it fires.
ROUTINES.md in the Rundock GitHub repo. It tracks any new fields and scheduler behaviour as they ship.