How to Use Claude Code Scheduled Tasks Without Keeping Your Computer On
Claude Code's remote routines run in the cloud on a schedule. Learn how to set up automated workflows that work while you sleep, starting at $20 a month.
The Problem With “Always-On” AI Workflows
Most AI automation setups share a common flaw: they need a machine running to do anything. You set up a Claude Code agent, get it working exactly how you want, close your laptop — and everything stops.
That’s fine for one-off tasks. But if you want Claude Code scheduled tasks to run overnight, pull data on a fixed cadence, or trigger workflows while you’re in meetings, you need something different. You need the agent to live in the cloud, not on your desk.
That’s exactly what Claude Code’s Routines feature is for. It lets you define automated workflows that execute on a schedule, entirely in Anthropic’s infrastructure. Your laptop can be off, your phone can be in your pocket, and the agent keeps running.
This guide walks through how it works, how to set it up, and what you can actually do with it — starting at $20 a month.
What Claude Code Routines Actually Are
Claude Code Routines are scheduled, cloud-hosted agent sessions. Instead of running interactively in your terminal, they execute on a defined schedule and handle a task from start to finish without you present.
Think of them as cron jobs with judgment. A traditional cron job runs a script. A Routine runs an agent — one that can read files, call APIs, browse the web, write code, send messages, and make decisions based on what it finds.
The key distinction from a regular Claude Code session is persistence and autonomy:
- Persistence: The session starts and runs in Anthropic’s cloud, not on your local machine.
- Schedule: You define when it runs — hourly, daily, weekly, or on a custom cron expression.
- Autonomy: The agent completes the task without you steering it. It uses tools, takes actions, and handles errors on its own.
This is meaningfully different from running Claude Code agents in headless mode, where you’d still need infrastructure to host the execution environment. Routines handles all of that for you.
What You Need to Get Started
Requirements
- A Claude.ai account on the Pro plan ($20/month) or higher. Routines is not available on the free tier.
- Claude Code installed and configured in at least one project, or access through the Claude.ai web interface.
- A clear task you want to automate — something repeatable, with a defined outcome.
That’s the short list. There’s no separate infrastructure to provision, no server to configure, no environment variables to manage in a cloud console. Anthropic handles the execution environment.
What the $20 Plan Gets You
The Pro plan ($20/month) includes access to Routines as part of the Claude Code feature set. You pay for the plan, plus any usage above the included limits.
For most scheduled automation use cases — daily summaries, weekly reports, hourly data pulls — you’ll stay comfortably within usage limits. Heavy multi-step workflows that run frequently will consume more, so it’s worth testing a few runs to understand the usage profile before setting aggressive schedules.
If you’re running automation at business scale, you’ll want to look at the Anthropic Managed Agents tier, which offers dedicated infrastructure and higher throughput.
How to Set Up a Claude Code Scheduled Task
Step 1: Define Your Routine in Plain Language
Before touching any settings, write down what you want the agent to do. Be specific. Good Routine instructions look like:
“Every weekday at 7 AM, check the GitHub repository for any new issues opened in the last 24 hours. Summarize each one in two sentences and send the summary to the team Slack channel #dev-updates.”
Or:
“Every Sunday at 6 PM, pull the weekly sales data from the Stripe dashboard, compare it to last week, identify the top three trends, and write a brief report to Google Drive in the /weekly-reports folder.”
The agent needs enough context to act independently. If you’d need to tell a colleague something before leaving them to handle a task, put it in the instruction.
Step 2: Create a New Routine
In the Claude Code interface (either the CLI or web), navigate to the Routines section. The exact path depends on your version:
- CLI: Run
claude routines createand follow the interactive prompts. - Web interface: Go to the Routines panel in your Claude Code dashboard and click “New Routine.”
You’ll be prompted to:
- Name the Routine (something descriptive, like “Daily GitHub Issue Summary”)
- Paste or type your task instructions
- Set the schedule (more on this in the next step)
- Connect any tools or integrations the agent needs
Step 3: Configure the Schedule
Claude Code uses standard cron syntax for scheduling, plus some human-readable presets:
| Preset | Runs |
|---|---|
| Hourly | Every hour at :00 |
| Daily | Every day at a time you choose |
| Weekdays | Monday–Friday at a time you choose |
| Weekly | Once per week on a day/time you choose |
| Custom | Any valid cron expression |
If you’re not familiar with cron syntax, the presets cover most common use cases. For more complex schedules — “every Tuesday and Thursday at 9 AM and 3 PM” — you’ll need to write it out as a cron expression.
A few useful examples:
0 9 * * 1-5— Weekdays at 9 AM0 */4 * * *— Every four hours0 8 * * 1— Every Monday at 8 AM30 7 1,15 * *— 1st and 15th of the month at 7:30 AM
Step 4: Connect Tools and Credentials
This is where most of the setup time goes. Depending on what your Routine needs to do, you’ll connect:
- GitHub: For reading issues, PRs, and commits
- Slack or email: For sending notifications and reports
- Google Drive or Notion: For writing output
- APIs: For reading data from external services
- Browser access: For scraping or interacting with web interfaces
Credentials are stored securely in Anthropic’s vault system, not in your local environment. You grant access once, and the Routine can use it on every run without re-authorization.
If you’re building something that needs to interact with web interfaces directly, the scheduled browser automation capabilities can handle that as part of the same Routine.
Step 5: Run a Test Before Scheduling
Before setting the schedule to live, trigger a manual run. This lets you:
- Confirm the agent has the right permissions
- Check that the output looks correct
- Catch any edge cases in your instructions
- Verify the right tools are being used
You can do this from the CLI with claude routines run [routine-name] or from the “Run Now” button in the web interface.
Step 6: Activate and Monitor
Once you’re satisfied with the test run, activate the schedule. The Routine will now run automatically at the times you’ve defined, without any action on your part.
Monitoring runs from the Routines dashboard. You’ll see:
- Last run status (success/failure)
- Execution time
- Output log from each run
- Any errors or tool failures
For more detail on what the dashboard surfaces, the Anthropic Managed Agents dashboard guide covers session monitoring, vault management, and cost tracking in depth.
Practical Use Cases
Knowing the mechanics is one thing. Knowing what to actually automate is where the value is. Here are common patterns that work well as Claude Code scheduled tasks:
Daily Intelligence Briefings
Set a Routine to run every morning that pulls from your chosen sources — news feeds, competitor sites, GitHub, Slack — and writes a structured summary to wherever you read it first. No manual pulling. No context switching.
This is the same pattern covered in guides on using Manus AI for automated news briefings — but with Claude as the agent.
Code Quality and Repository Health Checks
A Routine that runs after each sprint checks open PRs, flags ones that have been stale for more than 48 hours, identifies any tests that keep failing, and sends a summary to Slack. Your team gets a standing agenda item without anyone compiling it.
Weekly Business Reports
Pull data from Stripe, Mixpanel, or your CRM. Write a structured weekly report with comparisons to previous periods. Post it to Notion or email it to stakeholders. Consistently formatted, always on time.
For more complex use cases involving business metrics, AutoResearch-style agents can go further — running experiments and iterating autonomously based on what they find.
Content and SEO Monitoring
Check your top pages weekly for ranking changes, broken links, or outdated information. Have the agent flag anything that needs attention and draft suggested fixes. The self-improving agent pattern takes this further by having the agent act on its findings, not just report them.
Financial Monitoring
A Routine that checks transaction activity, flags unusual patterns, or pulls budget vs. actual comparisons and formats them for review. For more sophisticated use cases, see the guide on building a 24/7 AI trading agent with Claude Code Routines.
How Cloud Execution Changes What’s Possible
The shift from local to cloud execution isn’t just a convenience. It changes the kinds of workflows you can build.
When your agent lives on your laptop, you’re constrained by:
- When your machine is on and connected
- Your local environment’s resources
- Interruptions when you close the lid or lose internet
- The need to keep terminals open
When it runs in the cloud, those constraints disappear. You can build workflows that:
- Run at 3 AM without any machine on
- Execute reliably on a consistent schedule regardless of your availability
- Scale to multiple simultaneous Routines without degrading your local performance
- Persist across reboots, travel, and off days
This is the core promise of running Claude Code agents 24/7 without dedicated hardware. The older workarounds — keeping a Mac Mini running, renting a VPS, using GitHub Actions as a scheduler — all involved real overhead. Routines removes most of it.
If you want to understand the broader architecture of what makes persistent, proactive agents possible, the agentic OS heartbeat pattern explains the design principles well.
Routines vs. Other Scheduling Approaches
Routines vs. the /loop Command
The /loop command in Claude Code is for in-session repetition — running a task in a continuous loop within an active terminal session. It’s useful for development workflows where you want the agent cycling on a task while you’re present. It stops when your session ends.
Routines are different: time-triggered, cloud-hosted, and designed to run without you there. If you want something running while you sleep, you want a Routine, not /loop.
Routines vs. n8n or Zapier
Both n8n and Zapier are capable automation platforms. They excel at connecting apps with trigger/action logic. Comparing Claude Code Routines to n8n comes down to one key question: do you need agentic reasoning, or just data routing?
Zapier moves data between apps based on rules. Claude Code Routines use an AI agent that reads context, makes decisions, and handles ambiguity. They’re not competing at the same level. For simple trigger/action workflows, Zapier or n8n may be overkill-resistant. For tasks that require judgment, research, or unstructured output, Routines win.
Routines vs. GitHub Actions
GitHub Actions as a scheduler works well for developers who want cron-triggered automation in a CI/CD context. It’s powerful but requires writing workflow YAML and managing runners. Claude Code Routines have a higher setup floor for complex deployments but a lower floor for simple agentic tasks — you write instructions, not code.
Where Remy Fits
Routines solve the execution side of automation: when to run, where to run, how to keep it running. But if the output of your scheduled task is a full-stack application — a dashboard, an internal tool, a report viewer — that’s where Remy becomes relevant.
Remy compiles annotated markdown specs into full-stack apps: backend, database, auth, and deployment. So if your Claude Code Routine is generating data or reports and you want to build a real interface around that — something your team can log into, filter, and act on — Remy can build the application layer without requiring you to wire up infrastructure manually.
The workflow is direct: define your Routine to handle the data collection and processing, describe your application in a Remy spec, and the code is compiled from that spec. You’re not starting from TypeScript. You’re starting from a description of what the app does.
If you’re building something that combines scheduled AI automation with a persistent web interface, try Remy at mindstudio.ai/remy to see what the application layer looks like when the source of truth is a spec, not a codebase.
Common Mistakes to Avoid
Writing instructions that are too vague. “Summarize news” isn’t enough. The agent needs to know what sources, what format, how long, where to send it, and what to do if something is unavailable.
Not testing before activating. A Routine that fails silently on a 7 AM schedule is worse than no Routine at all. Always run at least one manual test first.
Using too many tools in one Routine. If a Routine needs to hit five different APIs, read three data sources, and post to four destinations, it will be fragile. Break complex workflows into multiple Routines that hand off to each other, or simplify the scope.
Setting schedules that are too frequent. Running a complex agent task every five minutes will burn through usage quickly and often doesn’t add value. Start with longer intervals and tighten them once you’ve confirmed the workflow is reliable.
Not monitoring early runs. The first week of a new Routine, check the logs after each run. Edge cases you didn’t anticipate will show up, and they’re easier to fix before they compound.
Frequently Asked Questions
Do Claude Code scheduled tasks keep running if I close my laptop?
Yes. That’s the core feature. Routines execute in Anthropic’s cloud infrastructure, not on your local machine. Once activated, they run on schedule regardless of whether your computer is on, connected, or in the same country.
What’s the difference between a Routine and a regular Claude Code session?
A regular Claude Code session is interactive — you’re present, steering the agent in real time. A Routine is autonomous and time-triggered. You write the instructions once, set the schedule, and the agent handles each run without you. This breakdown of automated workflow options covers the distinction in more detail.
Can a Claude Code Routine take actions, or just generate text?
It can take actions. Routines have access to the same tool set as interactive Claude Code sessions: file reads and writes, API calls, web browsing, code execution, and integrations with connected services. They can send Slack messages, update databases, push code changes, and more.
How much do Claude Code Routines cost?
You need a Claude.ai Pro subscription ($20/month) to access Routines. Usage beyond the included limits is billed based on model consumption. Light automation workflows typically stay within limits. Frequent, compute-heavy Routines will cost more — run a few test sessions to profile usage before setting aggressive schedules.
What happens if a Routine fails?
Failed runs are logged in the Routines dashboard with error details. Depending on your configuration, you can set up failure notifications so you’re alerted when something goes wrong. The agent won’t retry automatically by default, but you can trigger a manual re-run after diagnosing the issue.
How is this different from agentic workflows in other tools?
Most traditional automation tools execute predefined logic — if X happens, do Y. Claude Code Routines use an AI agent that reads context and applies judgment. The same Routine can handle variations in input, adapt to unexpected situations, and produce coherent output even when conditions change. That’s the meaningful difference between rules-based automation and agentic automation.
Key Takeaways
- Claude Code scheduled tasks run in Anthropic’s cloud — no machine needs to be on for them to execute.
- Setup requires a Pro plan ($20/month), a clear task description, a schedule, and connected tools.
- Routines are best for judgment-based automation — tasks that need more than simple trigger/action logic.
- Testing before activating is essential — run at least one manual test to catch permission and output issues early.
- Monitor early runs — edge cases appear in the first week; catching them then is far easier than later.
- They complement, not replace, other tools — for simple data routing, Zapier may be sufficient; for tasks requiring reasoning, Routines are the better fit.
If your output from these workflows needs a real interface — a dashboard, an internal tool, a report viewer — try Remy to build the application layer from a spec rather than from scratch.