Recurring tasks are markdown files in schedules/, each with YAML frontmatter:
---
name: morning-brief
cron: "0 7 * * *"
---
The prompt body — what the agent should do when this fires.
./install.sh --with-cron or seeyourai install-cron:
* * * * * <seeyourai> tick, with a PATH= line above it. Nothing fires
until you run one of those.seeyourai tick (src/commands/tick.ts)
walks every declared bot and, for each:
On a match, run-schedule.ts pastes the schedule’s whole body into the already-running agent’s tmux session, under a header line:
[scheduled-tick <time>] Time to run the "<name>" schedule — its full instructions follow (also saved in schedules/<name>.md). Execute them now.
No fresh claude processes are spawned: the schedule reuses the live,
authenticated session with its full tool surface (filesystem, MCP tools, browser,
channel). If the bot’s session isn’t running, that fire is skipped and logged.
(Not for a bot whose runs are followed: it gets them when it is idle.)
Keep bodies short and link to files in the brain for detail.
seeyourai schedules lists what is declared; seeyourai schedule <bot> <name>
runs one now.
Because the crontab is never rewritten when schedules change, macOS never re-prompts for the “administer your computer” TCC permission that a crontab write triggers (tmux is ad-hoc signed, so the grant isn’t remembered). Add or remove schedule files freely — the crontab stays put. On Linux there’s no TCC, but the single-entry design is still simpler.
Standard 5 fields: minute hour day-of-month month day-of-week. Supports *,
lists (1,2,3), ranges (1-5), and steps (*/5). Day-of-week 0 and 7 are
both Sunday. When both day-of-month and day-of-week are restricted, a match on
either fires (standard cron semantics). Times are local wall-clock.
The text is typed and Enter pressed without checking the screen. If the bot is at a
permission prompt, that can answer it. Bots launched with
--dangerously-skip-permissions rarely show one.
A bot whose runs are followed (below) does not have this problem.
Typing has other weak spots too: two schedules in the same second can lose one, a body of more than about 16 KB may never run, and nothing shows whether the session read it. Two settings per bot help. Both are off unless you turn them on:
seeyourai schedules tracked mybot on # typed as before, and followed
seeyourai schedules channel mybot on # sent as channel messages, and followed
seeyourai bot restart mybot # only for channel: it loads at the next start
SCHEDULE_DELIVERY |
|
|---|---|
type (default) |
typed at once; nothing is known about it |
tracked |
typed when the bot is idle, with a run id in the header line; followed |
channel |
a channel message when the bot is idle; followed. Typed, as with tracked, what cannot go that way |
tracked is one line in the bot’s declaration. channel also adds the scheduler
server to its .mcp.json and to its BOT_CMD. off takes exactly that out again (the
formatting of .mcp.json and the quotes around BOT_CMD may change; a BOT_CMD that was not
set stays as claude); its schedules are typed at once again.
What happens to a schedule that is due:
~/.seeyourai/scheduler/<bot>/inbox/,
which the channel hands to the session. One at a time per bot. Typed with the same
care as a web message to a bot on Ollama: not
into a dialog, a draft or copy mode, and Enter only while the box holds just that text.| Otherwise | |
|---|---|
| the channel did not take it in 5 minutes | it is taken back, and sent or typed once more |
| the bot restarted after it was handed over, and the transcript does not show it | once more, at once. What the channel had not taken yet, the new session takes |
| neither, and not in the session after 5 minutes | no second copy: lost. If the bot is not idle, only after an hour |
| the typing is refused, or the Enter does not go through | it waits, and the same text is tried again each minute; if the transcript shows it by then, it is not typed again |
| the turn ended early: an error, an interruption, a restart, or the session went on to something else | failed; not sent again |
| idle for an hour without a finished turn, or 3 hours in the session | unknown; not sent again |
| the transcript shows something the harness does not know | unknown; not sent again |
The second copy has the same id and says what it is. There is never a third.
What was lost, failed, unknown or dropped is told, in one message per bot, at most every
half hour, and not in ALERT_QUIET_HOURS (22:00-07:00 unless you set it). While there is
an alert that the bot’s Claude does not answer (logged out, over its limit), they wait.
What cannot be sent is kept and tried again after 5 minutes, then 10, 20 and so on up to
6 hours.
After two in a row that the session never showed, the schedules of that bot are typed until it restarts, each one once, and stay typed: not proven. The second alert says so.
The transcript format is Claude Code’s own and can change with an update. Then runs become unknown or lost, never processed.
With channel some schedules are still typed. The run says so, and why:
/tracked.Neither setting works where the harness cannot tell which transcript is the bot’s: a
BOT_CMD that sets CLAUDE_CONFIG_DIR or HOME (also in its --settings), changes the
folder, or starts anything but claude itself. on refuses then. If the BOT_CMD became
so later, its schedules are typed and stay typed: not proven.
seeyourai schedules (also --json) shows the last run of each schedule; the
dashboard’s Schedule page lists the ones that are not done. seeyourai bot remove deletes
what was kept about the runs of that bot.
ack: requiredA schedule can ask the bot to say that it is done:
---
cron: "0 7 * * *"
ack: required
---
The message then asks for a call of schedule_done with the run id and one line. The
tool only records it. If it does not come within an hour after the run reached the
session, you get an alert. It works by channel only; for a
run that had to be typed there is one alert that says so. A bot that asks for permissions
needs mcp__scheduler__schedule_done in its allowed tools.
The folder is private to your user (0700), and the channel takes only files of that user that nobody else can write. It has no tool to send. But the bots run as your user too: a bot with a shell could write there, as it could type into another bot’s pane.
Put the guard in the cron expression (0 8-21 * * *) or in the schedule’s own
text (“if it is after 9:30 pm, do nothing”), not in the crontab, which the
harness rewrites as one managed block.
For heavy schedules (browser scrapes, multi-file scans), have the schedule body
tell the agent to delegate to a sub-agent (the Agent tool) and return only
a short summary. That keeps the long-running session’s context from bloating with
every fire. Each fire is logged to the bot’s log: seeyourai bot logs <bot>.