Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Run prompts on a schedule changedscheduled-tasks

Nearest release: v2.1.304, published 6 hours before 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 20 Oct 2026 02:25 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 20 Oct 2026 02:37 UTC.

Upstream edited
Recorded here
Lines+21added
Lines−8removed
From line 2 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits19to this page, all time

## Manage session-scoped scheduled tasks ## How session-scoped scheduled tasks run ## Disable session-scoped scheduled tasks ## Manage scheduled tasks ## How scheduled tasks run ## Disable scheduled tasks

The whole hunk

from line 2, old and new numbered
/
lines
from line 2
22 
33> Use /loop and the cron scheduling tools to run prompts repeatedly, poll for status, or set one-time reminders within a Claude Code session.
44 
5Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to poll a deployment, babysit a PR, check back on a long-running build, or remind yourself to do something later in the session. To react to events as they happen instead of polling, see [Channels](/docs/en/channels): your CI can push the failure into the session directly. To keep the session working turn after turn toward a condition rather than on an interval, see [`/goal`](/docs/en/goal).
5Session-scoped scheduled tasks let Claude re-run a prompt automatically on an interval within a Claude Code session. Use them to poll a deployment, babysit a PR, check back on a long-running build, or remind yourself to do something later in the session.
66 
7Tasks are session-scoped. When you resume with `--resume` or `--continue`, Claude Code restores tasks that haven't [expired](#seven-day-expiry), except those listed under [Limitations](#limitations). For scheduling that survives independently of any session, use [Routines](/docs/en/routines) to create a routine on the cloud, set up a [Desktop scheduled task](/docs/en/desktop-scheduled-tasks), or use [GitHub Actions](/docs/en/github-actions).
7<Note>
8 These cases are covered on other pages:
89 
10 * **Reacting to events as they happen instead of polling**: see [Channels](/docs/en/channels). Your CI can push the failure into the session directly.
11 * **Keeping the session working turn after turn toward a condition rather than on an interval**: see [`/goal`](/docs/en/goal).
12</Note>
13 
14Tasks are session-scoped. When you resume with `--resume` or `--continue`, Claude Code restores tasks that haven't [expired](#seven-day-expiry), except those listed under [Limitations](#limitations). For scheduling that survives independently of any session, create a [cloud scheduled task](/docs/en/routines), set up a [Desktop scheduled task](/docs/en/desktop-scheduled-tasks), or use [GitHub Actions](/docs/en/github-actions).
15 
916## Compare scheduling options
1017 
1118Claude Code offers three ways to schedule recurring or one-off work:
from line 142
135142 
136143Claude pins the fire time to a specific minute and hour using a cron expression and confirms when it will fire.
137144 
138## Manage scheduled tasks
145<span id="manage-scheduled-tasks" />
139146 
147## Manage session-scoped scheduled tasks
148 
140149Ask Claude in natural language to list or cancel tasks, or reference the underlying tools directly.
141150 
142151```text theme={null}
from line 166
157166 
158167Each scheduled task has an 8-character ID you can pass to `CronDelete`. A session can hold up to 50 scheduled tasks at once.
159168 
160## How scheduled tasks run
169<span id="how-scheduled-tasks-run" />
161170 
171## How session-scoped scheduled tasks run
172 
162173The scheduler checks every second for due tasks and enqueues them at low priority. A scheduled prompt fires between your turns, not while Claude is mid-response. If Claude is busy when a task comes due, the prompt waits until the current turn ends.
163174 
164175All times are interpreted in your local timezone. A cron expression like `0 9 * * *` means 9am wherever you're running Claude Code, not UTC.
from line 205
194205 
195206### Seven-day expiry
196207 
197Recurring tasks automatically expire 7 days after creation. The task fires one final time, then deletes itself. This bounds how long a forgotten loop can run. If you need a recurring task to last longer, cancel and recreate it before it expires, or use [Routines](/docs/en/routines) or [Desktop scheduled tasks](/docs/en/desktop-scheduled-tasks) for durable scheduling.
208Recurring tasks automatically expire 7 days after creation. The task fires one final time, then deletes itself. This bounds how long a forgotten loop can run. If you need a recurring task to last longer, cancel and recreate it before it expires, or use [cloud scheduled tasks](/docs/en/routines) or [Desktop scheduled tasks](/docs/en/desktop-scheduled-tasks) for durable scheduling.
198209 
199210## Cron expression reference
200211 
from line 224
213224 
214225When both day-of-month and day-of-week are constrained, a date matches if either field matches. This follows standard vixie-cron semantics.
215226 
216## Disable scheduled tasks
227<span id="disable-scheduled-tasks" />
217228 
229## Disable session-scoped scheduled tasks
230 
218231Set `CLAUDE_CODE_DISABLE_CRON=1` in your environment to disable the scheduler entirely. The cron tools and `/loop` become unavailable, and any already-scheduled tasks stop firing. See [Environment variables](/docs/en/env-vars) for the full list of disable flags.
219232 
220233## Limitations
from line 241
228241 
229242For cron-driven automation that needs to run unattended:
230243 
231* [Routines](/docs/en/routines): run in the cloud on a schedule, via API call, or on GitHub events
244* [Cloud scheduled tasks](/docs/en/routines): run in the cloud on a schedule, via API call, or on GitHub events
232245* [GitHub Actions](/docs/en/github-actions): use a `schedule` trigger in CI
233246* [Desktop scheduled tasks](/docs/en/desktop-scheduled-tasks): run locally on your machine
234247 
Feedback