Claude Code Scheduled Tasks
Claude Code scheduled tasks are recurring jobs you create from the Routines page in the desktop app. Each task starts a brand-new Claude Code session at the time and frequency you set, in a folder you pick, with its own permission mode and model. When it fires you get a desktop notification and the session appears under a Scheduled section in the sidebar, where you can read what Claude did, review the changes, or answer a permission prompt. A local scheduled task runs on your machine with full access to your files and tools, which also means it only runs while the app is open and the computer is awake. The same Routines page can create a remote routine that runs in the cloud when your machine is off, but that is a different thing with different tradeoffs, and this post is about the local kind.
I set two up the day the feature landed: a weekday morning review of the previous day's commits on the club site, and a Monday dependency check. The setup took less time than writing this paragraph. The first week of runs is where I learned what the docs meant, and that is the useful part of this post.
The three ways to schedule Claude Code, and which one to pick
Claude Code has three schedulers and they are not interchangeable. The CCC Three-Clock Rule is how I keep them straight: pick the scheduler by what has to be true at the moment the task fires. If a session has to be open, use /loop. If your machine has to be on but nothing else, use a desktop scheduled task. If nothing at all has to be true, use a cloud routine. Anthropic's comparison table says the same thing in more columns.
The three schedulers, per Anthropic's Claude Code docs
| Cloud routine | Desktop scheduled task | /loop in a session | |
|---|---|---|---|
| Runs on | Anthropic-managed cloud | Your machine | Your machine |
| Needs the machine on | No | Yes | Yes |
| Needs an open session | No | No | Yes |
| Access to local files | No, fresh clone | Yes | Yes |
| Permission prompts | None, runs autonomously | Configurable per task | Inherits from the session |
| Minimum interval | 1 hour | 1 minute | 1 minute |
The reason I chose desktop tasks for the daily review is the local-files row. The review needs the actual working copy, my MCP config, and the allow rules I already set up, and a cloud routine gets a fresh clone with none of that. The reason I did not use /loop is that it is session-scoped and recurring loops expire after seven days, which is fine for babysitting a deploy and wrong for something I want running next month.
How to create a scheduled task in the desktop app
In the Code tab, click Routines in the sidebar (or under the sidebar's More menu), then New routine, then Local. You need Claude Desktop 1.1.5368 or later; older builds do not show local tasks at all. There are four fields, and the Instructions box is the one that matters.
- Name. Converted to lowercase kebab-case and used as the folder name on disk, so keep it short and unique. Mine is daily-commit-review.
- Description. One line, shown in the task list.
- Instructions. Write this exactly as you would type a message in the prompt box. The pickers under it set the permission mode and the model, and below that you choose the working folder and whether each run gets its own isolated worktree.
- Schedule. Presets are Manual (only runs when you click Run now), Hourly, Daily at a local time, Weekdays, and Weekly with a day picker. For anything else, such as every 15 minutes or the first of the month, ask Claude in any Desktop session in plain language and it sets the schedule for you.
You need a trusted folder before the task will save; Desktop prompts you to trust it if you have not. You can skip the form entirely and just type the request into a session. "Set up a daily code review that runs every morning at 9am" creates a recurring task, and "remind me at 3pm tomorrow to check the deploy" creates a one-time task that disables itself after it fires. I used the form the first time so I could see every field, and I have used plain language since.
What happened in my first week of runs
Three things went sideways, and every one of them is covered in the docs if you read them the way I did not.
The lid. Desktop checks the schedule every minute while the app is open, adds a small deterministic delay to stagger API traffic, and starts a fresh session when a task is due. If the computer is asleep at that moment, the run is skipped. I closed the laptop on a Tuesday evening and the Wednesday review did not happen until I opened it that night, because Desktop then runs exactly one catch-up for the most recently missed time within the last seven days and throws the rest away. There is a Keep computer awake switch under Settings, Desktop app, General, but the docs are clear that closing the lid still sleeps the machine. My fix was in the prompt, not the settings: "Only review commits since the last run. If it is after 5pm, skip the review and post a summary of what was missed." Now a late run is a short run, not a wrong one.
The stall. The second run needed to execute a command I had not approved, and because the task was in a permission mode that asks, it sat in the sidebar waiting for me. That is the correct behaviour, but it is not what you want at 8am. The fix is the one the docs recommend: click Run now right after you create the task, watch for every prompt, and pick always allow on each. Future runs auto-approve the same tools, and you can review or revoke those approvals from the task's Always allowed panel.
The half-finished work. By default a scheduled task runs against whatever state your working directory is in, including uncommitted changes. My Thursday review cheerfully critiqued a feature I was midway through, because I had left it uncommitted overnight. The worktree toggle on the task fixes this: each run gets its own isolated Git worktree, the same way [Claude Code worktrees](/blog/claude-code-worktrees) isolate parallel sessions. Turn it on for anything that reads or edits code.
Permissions: how to keep a task from stalling
Each scheduled task has its own permission mode, set when you create or edit it, and the allow rules in your ~/.claude/settings.json apply to scheduled sessions too. So the boring answer is: put the commands the task needs into your allow rules once, run it manually with Run now, approve what is left with always allow, and it will not stall again. A task that runs in Manual mode and hits a tool it is not allowed to use waits for you, and the session stays open in the sidebar until you answer.
Where the prompt lives on disk, and how to manage a task
Every task gets a folder at ~/.claude/scheduled-tasks/<task-name>/ (or under CLAUDE_CONFIG_DIR if you set one) containing a SKILL.md. The file has YAML frontmatter for name and description, and the body is the prompt. Edit the body and the change applies on the next run, which is how I tuned the review prompt without touching the form. The schedule, folder, model, and enabled state are not in that file; change those through Edit on the task's page or by asking Claude.
- Run now starts the task immediately. Use it after every prompt edit so you see the result before the scheduled run does.
- Status toggles Active and Paused, so you can silence a task for a week without deleting it.
- History lists every past run, including skipped ones. Hover a skipped entry to see why: the computer was asleep, the previous run was still going, or other tasks were already running.
- Delete archives every session the task created, and a checkbox in the dialog also removes its SKILL.md and data from disk.
- A task can reschedule itself from inside a run using the update_scheduled_task MCP tool, for example moving a review earlier when it notices a release branch. I have not needed it yet, but it is there.
You can also do all of this by asking. "Show me my scheduled tasks" and "pause my dependency-audit task" both work from any Desktop session.
The two tasks worth setting up first
Start read-only. A scheduled task can edit files, run commands, commit, and open pull requests, and the temptation is to schedule the whole pipeline on day one. Do not. Schedule the two jobs that produce a report you would read anyway, run them for a week, then decide what to let them touch.
- Weekday commit review. Weekdays preset, a morning time, worktree on. The prompt: review the commits since the last run, list anything that looks like a bug, a missing test, or a secret in the diff, and write the findings as a short summary. Do not push. If you want the deeper version, [Claude Code code review](/blog/claude-code-code-review) covers what a good review prompt asks for.
- Weekly dependency audit. Weekly preset, Monday. The prompt: list outdated dependencies, flag anything with a known security advisory, and propose the upgrade order. Report only. Once it has been right for a few weeks, let it open a pull request for the safe ones.
If your project already runs in CI, the same two jobs can run there on a schedule trigger instead, which is what [Claude Code GitHub Actions](/blog/claude-code-github-actions) is for. I run mine on the desktop because the review needs my local MCP servers and my allow rules, and because I like opening the app in the morning to a session that has already done the reading.
Compare schedules with people running them
The right cadence and the right prompt come from watching a week of history, not from guessing. Set the two tasks up, leave the worktree toggle on, and read the skipped entries as carefully as the successful ones.
Short, practical drops on skills, MCP, agents, prompts, and more. No spam, unsubscribe anytime.
Frequently asked questions
What are Claude Code scheduled tasks?
Recurring jobs you create from the Routines page in the Claude Code desktop app. Each task starts a fresh Claude Code session at the time and frequency you set, in the folder you choose, with its own permission mode and model. When it runs, you get a desktop notification and the session appears under a Scheduled section in the sidebar so you can review what Claude did.
Do Claude Code scheduled tasks run when my computer is off?
No. Local desktop scheduled tasks only run while the desktop app is open and the computer is awake. If the machine sleeps through a scheduled time, that run is skipped and Desktop starts one catch-up run for the most recently missed time when it wakes. For work that must run with the machine off, create a remote routine from the same Routines page, which runs in the cloud.
How do I create a scheduled task in Claude Code?
In the desktop app's Code tab, click Routines, then New routine, then Local. Fill in a name, a description, the instructions, a trusted working folder, and a schedule preset such as Daily or Weekdays. You can also ask Claude in any Desktop session, for example "set up a daily code review that runs every morning at 9am." You need Claude Desktop 1.1.5368 or later.
Why did my scheduled task stall?
Usually a permission prompt. Each task has its own permission mode, and if it needs a tool it is not yet allowed to use, the run waits in the sidebar for your approval. Click Run now after creating the task, approve each prompt with always allow, and future runs auto-approve the same tools. MCP tools marked requiresUserInteraction prompt every time and cannot be always-allowed.
What is the difference between a scheduled task and /loop?
/loop runs a prompt on an interval inside an open session and stops when that session ends; recurring loops also expire after seven days. A desktop scheduled task runs without any session open, persists across restarts, and starts a fresh session each time. Use /loop for polling during a session and a scheduled task for anything you want running next week.
Last reviewed by David Iya on September 26, 2026


