Automate & Schedule Claude CodeAutomationAgents

Claude Routines: scheduled cloud agents, explained

Claude Routines are scheduled Claude Code agents that run in Anthropic's cloud on a cron schedule, API call, or GitHub event - so they keep working even when your laptop is closed. Each run starts a fresh agent session with its own context, tools, and credentials, and reports back when it's done. They went to public beta on June 9, 2026.

Overview

Most people meet Claude as something they talk to. Routines are the opposite: Claude doing work on a schedule, without you in the room. If you've ever wanted "every weekday at 7am, pull our overnight signups, enrich them, and post a summary to Slack" to just happen, that's a Routine.

They matter because they move Claude from an assistant you operate to an operator that runs on its own clock. That's a different mental model - closer to a cron job than a chat - and it comes with cron-job responsibilities: idempotency, guardrails, and review. This guide covers what Routines are, exactly how they differ from Dispatch and /loop, how to set one up, where they shine for GTM, and the traps to avoid.

What are Claude Routines?

What are Claude Routines?

A Routine is a saved Claude Code task paired with a trigger. The task is a prompt (plus the tools, repo, and credentials it's allowed to use); the trigger decides when it runs. When it fires, Anthropic spins up a fresh Claude Code agent session in its managed cloud, runs the task to completion, records the result, and (optionally) notifies you.

The key phrase is "managed cloud." A Routine does not need your machine to be on. You define it once; Anthropic's infrastructure schedules and executes it. That's what separates a Routine from a script you run locally on a timer.

Routines entered public beta on June 9, 2026 (announced earlier that spring). Because it's a fast-moving beta, treat exact UI labels and limits as subject to change and check the current Claude Code docs before you rely on a detail.

💡

TipMental model: a Routine is a cron job whose "command" is an agent, not a shell script. Everything you know about good cron hygiene - idempotency, alerting, least privilege - applies.

What can trigger a Routine?

What can trigger a Routine?

Routines support three trigger types, and you can think of them as time-based, programmatic, and event-based:

  • Cron schedule - presets like hourly/daily/weekly, or a custom cron expression ("0 7 * * 1-5" = 7am on weekdays).
  • API call - kick a Routine off programmatically from your own systems.
  • GitHub event - run on repo activity, e.g. when a PR is merged or an issue is opened.
💡

TipPick the least-frequent trigger that still meets the need. A Routine that runs hourly when daily would do is 24x the cost and 24x the chances to misfire.

Routines vs Dispatch vs /loop (don't confuse them)

Routines vs Dispatch vs /loop (don't confuse them)

These three get conflated constantly because they all sound like "Claude doing repeated/automated work." They're genuinely different tools for different jobs:

  • Routines - scheduled, unattended, cloud. Fire-and-forget on a trigger; runs even with your laptop off. Use for recurring jobs.
  • Dispatch - manual, attended-ish, local. You text a task to your own desktop Claude (Cowork) from your phone; it runs on your machine and syncs back. Use to start a one-off task from away-from-keyboard.
  • /loop - a Claude Code slash command that repeats a prompt within one live CLI session. Use for short polling or iterative passes while you're actively working.
💡

TipRule of thumb: if it should happen on a clock without you, it's a Routine. If you're kicking off one task from your phone, it's Dispatch. If you're babysitting an iterative task in a terminal right now, it's /loop.

Where Routines earn their keep (GTM examples)

Where Routines earn their keep (GTM examples)

Routines are at their best on recurring, well-specified work where a fresh agent each time is a feature, not a bug:

  • Morning pipeline brief - every weekday at 7am, pull yesterday's inbound, enrich the accounts, and post a ranked summary to Slack.
  • Competitive watch - weekly, check named competitors' changelogs/pricing/job posts and append deltas to a doc.
  • Inbound triage - on a schedule, score and route new leads, flagging the ones a human should touch today.
  • Reporting - end-of-week, assemble a metrics readout from your warehouse and draft the summary.
  • Repo hygiene - on PR merge, run a doc/lint/test pass and open a follow-up issue if something regressed.
How to set it up

How to set it up

Write and test the task as a normal prompt first

Before you schedule anything, run the exact task interactively in Claude Code until it's reliable. A Routine is only as good as the prompt and tool access behind it - debugging a flaky agent on a 7am schedule is miserable.

Be explicit about the output and the stop condition: what to produce, where to put it, and what 'done' looks like. Vague tasks drift more the longer they run unattended.

💡

TipGive the full spec up front in one prompt. Unattended agents can't ask you a clarifying question mid-run.

Create the Routine and choose a trigger

Create the Routine from Claude Code (the /schedule command) or the Claude Code web/desktop UI. Give it the task prompt, then pick the trigger: a cron schedule, an API call, or a GitHub event.

Start with the lowest sensible frequency. You can always tighten the cadence once you trust it.

zsh
$# the local/DIY equivalent: cron + a one-shot Claude Code run
$crontab -l
0 7 * * 1-5 cd ~/gtm && claude -p "Run the morning pipeline brief" >> brief.log 2>&1
$# Routines do this in Anthropic's cloud instead - no machine required, with logs + retries
$

Scope tools, repo, and credentials with least privilege

Give the Routine only the tools and access it needs. If it must hit an authenticated service, use credential vaults (in beta) rather than pasting secrets into the prompt - prompts are stored in run history.

If the Routine writes anywhere that matters (your CRM, a repo, a customer-facing doc), decide now whether those writes should be gated or staged for human review.

💡

TipNever put an API key in the task prompt. It will live in the Routine's stored history. Use a vault.

Add notifications and a verification step

Configure where results land - Slack, email, a doc, a PR. Then build verification into the task itself: have the agent check its own output against a simple rubric, and post a one-line status (success / needs-review / failed) so you can scan results without reading every run.

Pipe failures somewhere you'll actually see them. A silent Routine that's been failing for two weeks is worse than no Routine.

Watch the first few runs, then let it run

Use the run history/logs to inspect the first several executions closely. Confirm the output is right, the cost per run is acceptable, and nothing fired that shouldn't have. Once it's boring, leave it alone - and put a calendar reminder to review it periodically as your data and tools change.

FAQ

Frequently asked questions

Do Routines run when my computer is off?

Yes. Routines execute in Anthropic's managed cloud, so they run on schedule regardless of whether your laptop is on or Claude Code is open. That's the main thing separating them from Dispatch (local) and /loop (in-session).

What's the difference between Claude Routines and Dispatch?

Routines are scheduled, unattended, and cloud-based - they fire on a trigger with no one watching. Dispatch is a Claude Cowork feature for sending a task to your own desktop Claude from your phone; it runs locally on your machine and stops if that machine sleeps. Use Routines for recurring jobs and Dispatch for one-off remote kickoffs.

How is a Routine different from the /loop command?

/loop repeats a prompt inside a single live Claude Code session in your terminal - good for short polling or iterative passes while you're working. A Routine is a separate, scheduled cloud execution that starts a fresh agent session each time it fires.

Are Claude Routines free?

Routines run on the Claude Code platform and consume model usage like any agent run; each execution is a full agent session. Check your plan's current Claude Code limits and the Routines beta terms, since pricing and quotas for the beta can change.

Can a Routine trigger on a GitHub pull request?

Yes. In addition to cron schedules and API calls, Routines support GitHub event triggers - for example, running a task when a PR is merged or an issue is opened.

Are Routines safe to let write to production systems?

Treat them like any unattended automation. Scope tools and credentials with least privilege, keep secrets in vaults rather than prompts, add a verification step, and gate or stage high-impact writes for human review. A scheduled agent is still probabilistic, so build guardrails before pointing it at anything irreversible.

Sources

Sources & further reading

Claude ships fast. This page was last reviewed Jun 12, 2026; verify time-sensitive details against the official docs above before relying on them.

Get the AI-for-GTM playbook in your inbox

New Claude guides, use cases, and prompts every couple of weeks.

Subscribe →