Claude Code Scheduled Tasks: Put Your AI on a Timer
Claude Code scheduled tasks made simple: /loop in a session, Desktop routines and cloud schedules — set up your AI alarm clock in five minutes flat.
Yes, Claude Code runs on a schedule — three different ways, actually: the /loop command inside a session, local scheduled tasks in the Desktop app, and cloud routines that run on Anthropic's servers even when your laptop is closed. I'm Evgeny, and I think of these as alarm clocks for your AI: you decide when it wakes up and what chore it does. Let's pick the right clock.
Can Claude really work on a schedule?
It can, and the docs draw the map clearly. Option one: /loop — quick polling inside an open session, minimum interval one minute, dies when the session ends. Option two: Desktop scheduled tasks — created in the Claude Code Desktop app, they run on your machine with full access to your local files, no open session needed, but only while the app is running and the computer is awake. Option three: cloud routines — they run on Anthropic-managed infrastructure with a minimum interval of one hour, your machine can be off entirely, and they can even fire on API calls or GitHub events.
What do you need to use scheduled tasks?
Two requirements gate the feature. Scheduled tasks require Claude Code v2.1.72 or later, so update first if the option is missing. And cloud routines need a Pro, Max, Team, or Enterprise plan with Claude Code on the web enabled — the in-session /loop and local Desktop tasks have no plan requirement beyond a current version.
Which commands schedule work in Claude Code?
Three entry points, all human-friendly. First, /loop runs a prompt on repeat: give it an interval and a task, or skip the interval and Claude picks the pause itself based on what it saw — short waits while things are moving, longer when it's quiet. Second, plain natural language sets one-time reminders: no command needed at all. Third, /schedule creates a cloud routine conversationally. Under the hood it's classic cron (CronCreate, CronList, CronDelete — the tools Claude uses when you ask 'what scheduled tasks do I have?'), but you never have to learn cron syntax: speak, and Claude translates.
/loop 5m check if the deployment finished and tell me what happened
Intervals take s, m, h, or d. Odd ones like 7m get rounded to the nearest clean step, and Claude tells you what it picked. Press Esc while the loop waits to stop it.
you ▸ remind me at 3pm to push the release branch claude ▸ Scheduled a one-time reminder for 15:00 today. you ▸ what scheduled tasks do I have? claude ▸ 1 task: one-shot reminder at 15:00 (id a1b2c3d4). you ▸ /schedule daily PR review at 9am claude ▸ Creating a cloud routine… saved to your account.
Set up a morning routine in 5 minutes
Your AI starts work before you do
- 1Decide where it should run. Needs your local files? Desktop task. Should run with the laptop closed? Cloud routine.
- 2Desktop: click Routines in the sidebar, then New routine, choose Local. Fill in name, instructions, and a schedule — Daily defaults to 9:00 AM. Or just tell Claude in any Desktop session: 'set up a daily code review that runs every morning at 9am'.
- 3Cloud: run /schedule daily PR review at 9am in the CLI, or build it at claude.ai/code/routines — prompt, repositories, connectors, trigger.
- 4Click 'Run now' once and watch the first run. For Desktop tasks, approve permission prompts with 'always allow' so future runs don't stall waiting for you.
- 5Check the run history after a few days and tune the prompt — schedules are written in pencil, not stone.
Why do scheduled tasks have time limits?
By design, and it's for your own good. Session tasks created with /loop expire seven days after creation — the task fires one last time, then deletes itself, which caps how long a forgotten loop can quietly burn your usage. Timing is also deliberately fuzzy: the scheduler adds jitter, so a recurring task may fire up to 30 minutes after the dot (scheduling at 9:03 instead of 9:00 dodges part of it). Desktop tasks only run while the app is open and the machine is awake — if your laptop slept through 9am, Desktop runs exactly one catch-up for the most recent missed slot when it wakes. And a session can hold at most 50 scheduled tasks, which, frankly, is a hint.
Cloud routines run fully autonomously — no permission prompts mid-run. The docs' advice is to scope what a routine can reach: only the repositories, connectors, and network access it actually needs. And a green status means the run finished without crashing, not that the job was done well — open the transcript and read what Claude actually did.
How do you use schedules well?
Three habits from the docs that save real pain. Write self-contained prompts: a routine runs with nobody around to answer questions, so spell out what to do and what success looks like. Add timing guardrails: since a missed Desktop run may fire at 11pm instead of 9am, write 'if it's after 5pm, just post a summary of what was missed'. And match the tool to the job: /loop for babysitting a deployment this afternoon, Desktop tasks for daily chores on your files, cloud routines for anything that must survive your laptop's mood. There's even a loop.md file — project or user level — that replaces the default /loop prompt with your own standing orders.
Lab: three alarm clocks
0/4Start with one recurring chore you already do every morning — checking a report, reviewing yesterday's changes, scanning for broken pages — and put it on a timer tonight. Tomorrow you'll wake up to finished work, and that feeling is exactly why people don't go back.

Author
Evgeny Arsentyev
PhD · Chief Product Officer at a healthtech company
▌ Reading is the blue pill
Want to actually build this?
Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.
◉ Take the red pill →