Skip to content
Logo

Schedules

Use Schedules in the app sidebar to manage scheduled prompts across projects. You can also manage a project's schedules from its Project page.

Create a schedule

  1. Choose the repository and base branch, and write the prompt.
  2. Choose Once for a specific date and time, Cron for recurring work, or Watch to run on events (see Watch).
  3. Set the time zone and check the next-run preview (Watch has neither).
  4. Choose the chat mode. For Ask, Plan, Agent, or Review, pick the model. For Autopilot, pick the workflow and policy. Set Simplify for this task.
  5. Save the schedule.

Each occurrence creates a fresh task workspace from the base branch, runs normal project setup, and starts the saved prompt or workflow. Configure .recur/project.toml so those workspaces are ready to run.

An Autopilot schedule needs no one at the keyboard to start it, for example a nightly Review & fix or a weekly Security review & fix.

Cron examples

ExpressionWhen
0 9 * * MON-FRIWeekdays at 09:00 in the selected time zone
*/15 9-17 * * MON-FRIEvery 15 minutes during weekday hours
0 9 1,15 * *The 1st and 15th at 09:00
@daily, @hourly, @weekly, @monthlyCommon cadences
@every 2h30mA fixed interval
@rebootEvery time Recur starts

Cron takes five fields (minute hour day month weekday), or six with a leading seconds field, and accepts lists, ranges, steps, and names such as MON or JAN.

Watch

A Watch schedule runs on events instead of a clock. You give it a shell command, and Recur keeps that command running in the project root while Recur is open. Every non-empty line the command prints to stdout is one event. Recur has no built-in integrations: anything you can print from a script (CI, logs, a queue, an API you poll) can start a run.

  • The prompt. Recur appends the events to the saved prompt as a JSON array, oldest first, one element per line: the parsed value when the line is valid JSON, the line as a string otherwise. Printing one compact JSON object per line (jq -c) gives the run structured data.
  • Busy runs. Events that arrive while this schedule's previous run is still active or waiting for you are queued, then start a single run together when it settles. Up to 100 events queue; beyond that the oldest are dropped.
  • Exits. If the command exits, Recur starts it again after a short delay that doubles up to a minute. The schedule row shows whether it is watching, the last exit and its last stderr line, when the last event arrived, and how many events are queued.
  • Environment. The command runs as you, with your environment plus RECUR_ROOT, RECUR_PROJECT_ID, and the project's Env, like project setup commands. Scripts it runs come from the project root checkout, not from a task workspace.
  • Buffering. Make sure each line is flushed when it is printed: use grep --line-buffered and similar flags when piping, or Recur only sees events when a buffer fills.

Pause stops the command, and queued events are dropped. Run now starts a run with any queued events. Queued events are also lost when Recur quits.

Failed CI on main

Save this as scripts/watch-failed-ci.sh and use sh scripts/watch-failed-ci.sh as the command. It polls every five minutes and prints one JSON line per new failed run:

latest() { gh run list --branch main --status failure --limit 20 --json databaseId,displayTitle,url; }
seen=$(latest | jq '[.[].databaseId] | max // 0')
while sleep 300; do
  runs=$(latest) || continue
  echo "$runs" | jq -c --argjson s "$seen" '.[] | select(.databaseId > $s)'
  seen=$(echo "$runs" | jq --argjson s "$seen" '[$s, .[].databaseId] | max')
done

With a prompt such as "Find out why these CI runs failed and fix the cause", each new failure starts an Agent run that receives the run's id, title, and URL.

Errors in a log

tail -F log/development.log | grep --line-buffered -E 'ERROR|FATAL'

Each matching line starts a run with that line as a string event. A burst of errors while a run is active becomes one follow-up run.

Agents can create watches

Agents create Watch schedules with the create_schedule tool (cadence watch and a command), so an agent can set up a listener while it works. Because the command runs as you, Recur shows it and asks you to approve it unless permissions are bypassed. See Agents can manage schedules for editing and the other cadences.

Recur must be open

Schedules run while Recur is open, and Watch commands run only then. Recur does not install a background scheduling daemon. An occurrence that comes due while Recur is closed or the machine is asleep is marked missed; missed runs are not replayed later.

If the previous run is still active or waiting for your answer, the next timed occurrence is skipped (Watch events wait instead). Follow each run's workspace in the sidebar and Inbox.

Manage schedules

Run now starts a run immediately. Pause stops future occurrences until you Resume. Deleting a schedule stops future occurrences and keeps the workspaces it already created.

Settings → General → Keep scheduled workspaces keeps the last N live workspaces per schedule and removes older settled runs. 0 keeps all.

Agents can manage schedules

Agents in Agent mode can manage their own project's schedules when you ask them to:

  • create_schedule creates one: once, daily, weekdays, cron or Watch, in Ask, Plan, Agent or Review mode. It cannot create an Autopilot schedule.
  • create_schedule with a schedule's id edits it, for example to change its time or fix a Watch command that keeps exiting.
  • list_schedules lists the project's schedules with their next run, last status and, for Watch, the command's live status. Ask and Plan chats have this one too.
  • delete_schedule deletes one. Workspaces it already started stay.

Schedules an agent creates show up in the Schedules view like your own, and you can pause, edit or delete them there. Every occurrence is a full agent run and a Watch command runs as you, so Recur asks before it creates, edits or deletes one and shows a Watch command in the prompt. It does not ask when Settings → Providers → Bypass tool permissions is on.

Agents in child workspaces cannot manage schedules. To come back to the same chat later, an agent uses a check-back instead.