Run prompts on a schedule changedscheduled-tasks
Nearest release: v2.1.276, published 2 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 17 Sep 2026 23:02 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Sep 2026 23:37 UTC.
Upstream edited
Recorded here
Lines+31added
Lines−31removed
From line
10
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits11to this page, all time
The whole hunk
from line 10, old and new numbered
/
from line 10
1010
1111Claude Code offers three ways to schedule recurring or one-off work:
1212
13| | [Cloud](/docs/en/routines) | [Desktop](/docs/en/desktop-scheduled-tasks) | [`/loop`](/docs/en/scheduled-tasks) |
14| :------------------------- | :---------------------------------- | :------------------------------------- | :------------------------------------------------------------------------- |
15| Runs on | Cloud, Anthropic-managed by default | Your machine | Your machine |
16| Requires machine on | No | Yes | Yes |
17| Requires open session | No | No | Yes |
18| Persistent across restarts | Yes | Yes | Restored on `--resume`, with [exceptions](/docs/en/scheduled-tasks#limitations) |
19| Access to local files | No (fresh clone) | Yes | Yes |
20| MCP servers | Connectors configured per task | [Config files](/docs/en/mcp) and connectors | Inherits from session |
21| Permission prompts | No (runs autonomously) | Configurable per task | Inherits from session |
22| Customizable schedule | Via `/schedule` in the CLI | Yes | Yes |
23| Minimum interval | 1 hour | 1 minute | 1 minute |
13| | [Cloud](/docs/en/routines) | [Desktop](/docs/en/desktop-scheduled-tasks) | [`/loop`](/docs/en/scheduled-tasks) |
14| :- | :- | :- | :- |
15| Runs on | Cloud, Anthropic-managed by default | Your machine | Your machine |
16| Requires machine on | No | Yes | Yes |
17| Requires open session | No | No | Yes |
18| Persistent across restarts | Yes | Yes | Restored on `--resume`, with [exceptions](/docs/en/scheduled-tasks#limitations) |
19| Access to local files | No (fresh clone) | Yes | Yes |
20| MCP servers | Connectors configured per task | [Config files](/docs/en/mcp) and connectors | Inherits from session |
21| Permission prompts | No (runs autonomously) | Configurable per task | Inherits from session |
22| Customizable schedule | Via `/schedule` in the CLI | Yes | Yes |
23| Minimum interval | 1 hour | 1 minute | 1 minute |
2424
2525<Tip>
2626 Use **cloud tasks** for work that should run reliably without your machine. Use **Desktop tasks** when you need access to local files and tools. Use **`/loop`** for quick polling during a session.
from line 30
3030
3131The `/loop` [bundled skill](/docs/en/commands) is the quickest way to run a prompt on repeat while the session stays open. Both the interval and the prompt are optional, and what you provide determines how the loop behaves.
3232
33| What you provide | Example | What happens |
34| :------------------------ | :-------------------------- | :------------------------------------------------------------------------------------------------------------ |
35| Interval and prompt | `/loop 5m check the deploy` | Your prompt runs on a [fixed schedule](#run-on-a-fixed-interval) |
36| Prompt only | `/loop check the deploy` | Your prompt runs at an [interval Claude chooses](#let-claude-choose-the-interval) each iteration |
37| Interval only, or nothing | `/loop` | The [built-in maintenance prompt](#run-the-built-in-maintenance-prompt) runs, or your `loop.md` if one exists |
33| What you provide | Example | What happens |
34| :- | :- | :- |
35| Interval and prompt | `/loop 5m check the deploy` | Your prompt runs on a [fixed schedule](#run-on-a-fixed-interval) |
36| Prompt only | `/loop check the deploy` | Your prompt runs at an [interval Claude chooses](#let-claude-choose-the-interval) each iteration |
37| Interval only, or nothing | `/loop` | The [built-in maintenance prompt](#run-the-built-in-maintenance-prompt) runs, or your `loop.md` if one exists |
3838
3939You can also pass a skill as the prompt, for example `/loop 20m /review-pr 1234`, to re-run that skill each iteration. A scheduled fire only runs skills that Claude is [allowed to invoke on its own](/docs/en/skills#control-who-invokes-a-skill). The following reach Claude as plain text instead of executing:
4040
from line 97
9797
9898Claude looks for the file in two locations and uses the first one it finds.
9999
100| Path | Scope |
101| :------------------ | :--------------------------------------------------------------- |
102| `.claude/loop.md` | Project-level. Takes precedence when both files exist. |
100| Path | Scope |
101| :- | :- |
102| `.claude/loop.md` | Project-level. Takes precedence when both files exist. |
103103| `~/.claude/loop.md` | User-level. Applies in any project that does not define its own. |
104104
105105The file is plain Markdown with no required structure. Write it as if you were typing the `/loop` prompt directly. The following example keeps a release branch healthy:
from line 149
149149
150150These are the underlying tools Claude uses:
151151
152| Tool | Purpose |
153| :----------- | :-------------------------------------------------------------------------------------------------------------- |
152| Tool | Purpose |
153| :- | :- |
154154| `CronCreate` | Schedule a new task. Accepts a 5-field cron expression, the prompt to run, and whether it recurs or fires once. |
155| `CronList` | List all scheduled tasks with their IDs, schedules, and prompts. |
156| `CronDelete` | Cancel a task by ID. |
155| `CronList` | List all scheduled tasks with their IDs, schedules, and prompts. |
156| `CronDelete` | Cancel a task by ID. |
157157
158158Each scheduled task has an 8-character ID you can pass to `CronDelete`. A session can hold up to 50 scheduled tasks at once.
159159
from line 180
180180
181181`CronCreate` accepts standard 5-field cron expressions: `minute hour day-of-month month day-of-week`. All fields support wildcards (`*`), single values (`5`), steps (`*/15`), ranges (`1-5`), and comma-separated lists (`1,15,30`).
182182
183| Example | Meaning |
184| :------------- | :--------------------------- |
185| `*/5 * * * *` | Every 5 minutes |
186| `0 * * * *` | Every hour on the hour |
187| `7 * * * *` | Every hour at 7 minutes past |
188| `0 9 * * *` | Every day at 9am local |
189| `0 9 * * 1-5` | Weekdays at 9am local |
190| `30 14 15 3 *` | March 15 at 2:30pm local |
183| Example | Meaning |
184| :- | :- |
185| `*/5 * * * *` | Every 5 minutes |
186| `0 * * * *` | Every hour on the hour |
187| `7 * * * *` | Every hour at 7 minutes past |
188| `0 9 * * *` | Every day at 9am local |
189| `0 9 * * 1-5` | Weekdays at 9am local |
190| `30 14 15 3 *` | March 15 at 2:30pm local |
191191
192192Day-of-week uses `0` or `7` for Sunday through `6` for Saturday. Extended syntax like `L`, `W`, `?`, and name aliases such as `MON` or `JAN` is not supported.
193193
No line in this hunk matches that.