/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: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:
- Built-in commands such as
/permissions,/model, or/clear - Skills marked
disable-model-invocation: true, including the bundled/verifyskill - Skills withheld from Claude by a
skillOverridessetting or aSkilldeny rule - MCP prompts such as
/mcp__github__list_prs
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.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.