Skip to main content
Scheduled 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: 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. Tasks are session-scoped: they live in the current conversation and stop when you start a new one. Resuming with --resume or --continue brings back any task that hasn’t expired: a recurring task created within the last 7 days, or a one-shot whose scheduled time hasn’t passed yet. For scheduling that survives independently of any session, use Routines to create a routine on the cloud, set up a Desktop scheduled task, or use GitHub Actions.

Compare scheduling options

Claude Code offers three ways to schedule recurring or one-off work:
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.

Run a prompt repeatedly with /loop

The /loop bundled skill 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. You 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. The following reach Claude as plain text instead of executing:

Run on a fixed interval

When you supply an interval, Claude converts it to a cron expression, schedules the job, and confirms the cadence and job ID.
The interval can lead the prompt as a bare token like 30m, or trail it as a clause like every 2 hours. Supported units are s for seconds, m for minutes, h for hours, and d for days. Seconds are rounded up to the nearest minute since cron has one-minute granularity. Intervals that don’t map to a clean cron step, such as 7m or 90m, are rounded to the nearest interval that does and Claude tells you what it picked.

Let Claude choose the interval

When you omit the interval, Claude chooses one dynamically instead of running on a fixed cron schedule. After each iteration it picks a delay between one minute and one hour based on what it observed: short waits while a build is finishing or a PR is active, longer waits when nothing is pending. The chosen delay and the reason for it are printed at the end of each iteration.