# Recipe: run a recipe on a schedule, with no one at the keyboard

A copy-paste prompt: your coding agent sets up a scheduled job that runs a recipe, such as the Monday brief, with Claude Code and onecell, every week.

> [!info]
> **For:** anyone who runs the same recipe every week and would rather find the result waiting. **When:** set up once. **Takes:** about ten minutes. **You get:** a scheduled job that runs a recipe with Claude Code and onecell, and a draft in onecell each time it runs.

## The prompt

Paste it into your coding agent where the job should live: a repo with GitHub Actions, or a server with cron. You need a Drafts only key and an Anthropic API key as secrets.

```text
Set up a scheduled job that runs a onecell recipe with no one at the
keyboard. Follow the "A scheduled agent" section of
https://onecell.io/p/automations.md.

- Recipe: <recipe name, e.g. Monday brief>. Fetch its prompt from
  https://onecell.io/p/<recipe slug>.md and save it as a prompt file,
  with the blanks filled in: <cluster or cell, and any other blanks>.
- Schedule: <e.g. Mondays at 07:00 Europe/London>.
- Where: <GitHub Actions in this repo, or cron on this machine>.
- Write onecell-mcp.json with the onecell server; read ONECELL_API_KEY
  and ANTHROPIC_API_KEY from secrets, never from files.
- Run: claude -p "$(cat <prompt file>)" --mcp-config onecell-mcp.json
  --strict-mcp-config --allowedTools 'mcp__onecell__*' < /dev/null
- Allow only onecell's tools, so the job can't touch anything else.

Show me the files, then run it once by hand so we can see the draft.
```

## What your agent does

1. Fetches the recipe
   From its public Markdown, and fills in the blanks once, so every run asks the same question.
2. Writes the job
   A schedule, the MCP config and the command, with keys read from secrets.
3. Locks it down
   Only onecell's tools are allowed, and the key is Drafts only, so the job can read and draft, and nothing more.
4. Runs it once with you
   So you see the first draft before the schedule takes over.

## What you get

The Monday brief for Fernbrook, a made-up team, waiting in onecell when they start the week.

<!-- onecell:block {"type":"embed","documentId":"1ff8bcdd-4cdd-42fa-8b67-11b5c357649c"} -->
[Sample Monday brief: Fernbrook, week of 18 August](https://onecell.io/p/sample-monday-brief-fernbrook)

## Variations

<details>
<summary>A daily start instead of a weekly brief</summary>

Schedule it every weekday at 08:00 with the Monday brief's *daily start* variation, saved to your Inbox.

</details>

<details>
<summary>A weekly repo snapshot</summary>

Use the Repo snapshot recipe with `<since>` set to “last snapshot”, run on Fridays in the repo's own CI so it can read git.

</details>

<details>
<summary>Tell the team it ran</summary>

Add a last step that posts the draft's link to your team chat. The draft is the record; the message is only the nudge.

</details>

## Tips

- Start with a recipe you already run by hand, so you know what good looks like.
- Keep the schedule's output as drafts. A person publishing it is the review.
- If a run fails, the job's log says why; onecell only sees the runs that reached it.

---

Part of [onecell recipes](https://onecell.io/help/recipes): copy-paste prompts for using onecell in your work.
