
Organizing three methods for scheduled execution in Claude Code
This page has been translated by machine translation. View original
I was having Claude Code manage my daily tasks, but got tired of manually starting the skill every day and wanted to automate it. When I asked Claude Code to "make it run daily," it set it up with /loop, but I was suspicious and after investigating, I discovered that this setup needs to be recreated each time the session closes. Further research revealed that there are three methods for scheduling execution in Claude Code, which I've summarized here.
About This Article
[Target Audience]
- People who want to schedule recurring tasks in Claude Code
- Those looking to deepen their knowledge of Claude Code
Main Content
There are three ways to schedule recurring prompts in Claude Code.
Each differs in where it runs and how long it lasts, so let's examine them one by one.
While the official documentation is available in Japanese, I'm quoting from the English version in this article due to translation issues in the Japanese version and to avoid potentially outdated information.
/loop (CronCreate Tool)
The official documentation states:
Use
/loopfor quick polling during a session.
The /loop command (CronCreate tool) is for short-term polling during a session. It's intended for monitoring deployment completion, checking build completion, etc.
As a built-in skill, it can be configured by explicitly calling the /loop command from Claude Code or by requesting it in natural language.
It offers flexible scheduling with the standard 5-field cron expression (minute hour day month weekday), with a minimum interval of 1 minute.
It operates in session scope, so there is no persistence. When you close the session, the task disappears. Also, recurring jobs are automatically deleted after a few days (the documentation mentions 3 days, while the tool schema says 7 days, so the exact duration is unclear) even if the session remains active. In any case, it's not designed for long-term operation.
/schedule (Cloud Task)
The official documentation states:
A scheduled task runs a prompt on a recurring cadence using Anthropic-managed infrastructure. Tasks keep working even when your computer is off.
Cloud tasks created with the /schedule command run on Anthropic's servers.
They can be created using Claude Code's /schedule command, the Web interface, or the desktop app. The minimum interval is 1 hour, and they're available on Pro, Max, Team, and Enterprise plans.
Each execution clones the repository and starts a new session, so context from previous executions isn't retained. Your prompt needs to be self-contained.
Additionally, MCP servers are limited to Connectors (Slack, Linear, etc. - GUI setup type MCP servers) configured on claude.ai. Even if you commit .mcp.json to your repository, it won't be loaded in the Cloud task execution environment. Also, only GitHub repositories are supported, not GitLab or others.
Desktop Local Task
The official documentation states:
Local tasks: run on your machine. They have direct access to your local files and tools, but the desktop app must be open and your computer awake for them to run.
Desktop Local tasks are scheduled executions managed by the desktop app. They run in your local environment, so they can access local files and use locally configured MCPs.
They can be created via the desktop app GUI or by asking in natural language within a Desktop session (e.g., "Review my code every morning at 9"). The minimum interval is 1 minute.
I investigated why they can't be created from CLI Claude Code but can from a Claude Desktop session, and found it's because the desktop app has a special MCP called scheduled-tasks MCP.
Importantly, they only run when the desktop app is running and the PC is not in sleep mode. Tasks that are skipped while sleeping are checked when the system resumes, looking back up to 7 days, and only the most recent missed task is executed as catch-up.
Comparison Table
| /loop | /schedule | Desktop Local | |
|---|---|---|---|
| Setup Method | CLI / Desktop | CLI / Web / Desktop | Desktop only |
| Execution Location | Local | Anthropic Cloud | Local |
| Requires PC to be On | Yes | No | Yes |
| Requires Active Session | Yes | No | No |
| Persistence | None | Yes | Yes |
| Auto-deletion | Yes (expires in 3 or 7 days) | No | No |
| Local Files | Accessible | Not accessible | Accessible |
| MCP Servers | Session inherited | Connectors only | Local config + Connectors |
| Minimum Interval | 1 minute | 1 hour | 1 minute |
| Execution Delay | Up to 10% of period (max 15 min) | Several minutes (fixed) | Up to 10 minutes (fixed) |
Summary
The official documentation's usage guide is straightforward, so I'll quote it:
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.
- /schedule (Cloud Task): When you need tasks to run reliably even with your PC off
- Desktop Local Task: When you need access to local files and tools
- /loop: For quick polling during a session
In my case mentioned at the beginning, Desktop Local Task was the only choice since I needed access to a local SQLite database and had to use locally configured MCPs.
Reference URLs
- Run prompts on a schedule (/loop)
- Schedule tasks on the web (Cloud Task)
- Claude Code Desktop (Desktop Local Task)
About Classmethod Operations, Inc.
We are the operations company of the Classmethod Group.
Our specialized teams in operations, maintenance development, support, IT systems, and back office provide everything from business outsourcing to problem-solving and high-value services through full utilization of IT and AI.
We are recruiting members for various positions.
If you are interested in our culture, systems, and work style that realize both "Operation Excellence" and "Work and live true to yourself," please visit the Classmethod Operations, Inc. Corporate Site.