Claude Code scheduled tasks can repeat checks within a CLI session, run locally through Desktop, or execute in the cloud. The right option depends on how long the task must persist and whether your computer or session will remain active.
What Claude Code Scheduled Tasks Are
Claude Code is an agentic coding tool available through the terminal, IDE integrations, the desktop app, and a browser. Its scheduling features can automate recurring checks for deployments, pull requests, integration tests, builds, and similar coding work.
In the CLI, /loop repeats a prompt during the current session. Claude Code also accepts one-time natural-language requests, such as asking for a reminder at a specified time or a later check on integration tests. These are session tasks rather than an always-on external scheduler: whether they run depends on the Claude Code process and its current state.

How to Schedule and Stop Prompts with /loop
To run a check every five minutes, enter:
/loop 5m check if the deployment finished and tell me what happened
This creates a fixed-interval prompt. If you provide a prompt without an interval, Claude can choose the interval. Entering /loop by itself starts the documented maintenance prompt, which continues unfinished conversational work, tends the current branch’s pull request, and performs cleanup when nothing else is pending.
Stopping behavior depends on the loop type. While a self-paced loop is waiting, press Esc to stop it. Ctrl+C can also stop it while Claude is idle, except in an attached background session. Those controls do not cancel a fixed-interval scheduled task; ask Claude to cancel that task instead. An uncanceled loop expires after seven days.

Session Limits, Missed Runs, and Restoration
For CLI scheduling, “session limits” concern task lifetime and execution—not subscription quotas or model-token allowances. Session-scoped tasks fire only while Claude Code is running and idle. If an interval passes during a long request, the scheduled prompt runs once after Claude becomes idle; it does not run separately for every missed interval.
Closing the terminal or allowing the session to exit stops these tasks from firing. Backgrounding the session is different: /loop tasks carry into the background session and can continue without a terminal.
When you return with claude --resume or claude --continue, Claude Code restores eligible tasks created with CronCreate. A self-paced /loop is not restored and must be started again. Restored recurring tasks do not replay executions missed while the session was stopped; the next run is the first one due after resumption. Loops also retain the documented seven-day maximum lifetime unless canceled sooner.
Conclusion
Choose the scheduling surface according to where and how long the work must run. CLI /loop is suited to repeated prompts tied to an active or backgrounded Claude Code session. Desktop scheduled tasks run locally with access to local files and tools, but the app must be open and the computer awake. Desktop supports hourly, daily, weekday, weekly, manual, and custom cron schedules; custom schedules cannot run more often than hourly.
Cloud scheduled tasks can use schedule, API, or GitHub-event triggers and can run while your computer is off. Pick the surface that matches your persistence requirements, then begin with one documented recurring check and verify when it runs, stops, or resumes.
Disclosures and limitations
- This article was prepared with AI assistance from the cited Claude Code documentation sources.
- The scheduling options are presented as workflow choices, not affiliate purchasing recommendations.
Sources
- Run prompts on a schedule – Claude Code Docs — Claude Code Docs
- What Is Claude Code /loop ― A Session-Scoped Scheduler That Queues Your Next Follow-Up — SmartScope
- Put Claude on Autopilot: Scheduled Tasks with /loop and /schedule built-in Skills — plainenglish.io/artificial-intelligence/put-claude-on-autopilot-scheduled-tasks-with-loop-and-schedule-built-in-skills
- Run prompts on a schedule – Claude Wiki — claude-wiki.com
- Claude Code Scheduled Tasks & Routines: The Complete Guide (2026) — popularaitools.ai
- Claude Schedule Tasks: 25 Example Use Cases — aigeniuslab.substack.com
- Curated research source from code.claude.com — code.claude.com
- Schedule recurring tasks in Claude Code Desktop – Claude Code Docs — Claude Code Docs
- Schedule recurring tasks in Claude Cowork | Claude Help Center — support.claude.com
- Automate work with scheduled tasks – Claude Code Docs — Claude Code Docs
Improve this guide
Report a problem or suggest the next question
Submissions enter a private editorial queue. They are reviewed and deduplicated before any public update or new page is created.
