---
title: "Routines"
description: "The Monday-morning report that writes itself."
order: 29
duration: "10 min"
chapter: "07-the-always-on-system"
type: lesson
---

## Set up your first schedule

Routines let Claude run recurring workflows without any trigger from you. Set one up with the `/schedule` command from within a Claude Code session, or in the browser at claude.ai/code/routines:

```
/schedule "Every Monday at 8am, pull last week's transactions
from QuickBooks, categorize any uncategorized ones using our
categorization rules, and send a summary to Telegram."
```

A routine runs in the cloud against one of your repositories — which is exactly why the distillation pipeline matters: the skills and rules you committed to the repo are what the routine knows. It can be triggered three ways: on a schedule (cron), by an API call to its fire endpoint, or by GitHub events like a PR opening. `/schedule "check the vendor portal" in 3 days` gives you a one-off run that disables itself after firing.

One distinction to keep straight:

| Mode | How | Where It Runs | Trade-off |
|------|-----|--------------|-----------|
| **Cloud (Routines)** | `/schedule` or claude.ai/code/routines | Anthropic's infrastructure | Always runs, even with your laptop closed — but sees your repo and hosted MCP servers, not your local machine |
| **Local** | Scheduled tasks in the Desktop app, or your own cron firing `claude -p` | Your machine | Full access to local MCP servers, files, and credentials — but only while the machine is awake |

For Cornwall Market, the Monday report can run in the cloud because QuickBooks is reachable over a hosted MCP connection. A job that needs the invoice PDFs sitting on Sarah's desktop stays local.

<div class="exercise">
  <div class="callout-label">Try This</div>
  <p>Set up your first routine. Pick something you check every morning — a report, a dashboard, a set of numbers. Use <code>/schedule</code> to automate it.</p>
  <p>Cornwall Market's Monday morning routine does this:</p>
  <p><strong>1.</strong> Pull last week's transactions from QuickBooks (MCP)</p>
  <p><strong>2.</strong> Categorize any uncategorized ones using the skill</p>
  <p><strong>3.</strong> Calculate food cost percentage vs previous week</p>
  <p><strong>4.</strong> Flag any invoices over 30 days overdue</p>
  <p><strong>5.</strong> Compile everything into a summary</p>
  <p><strong>6.</strong> Send via Telegram</p>
  <p>The team arrives Monday morning to a compiled financial summary. No one opened QuickBooks. No one pulled a report. The system did it while they were sleeping.</p>
</div>

## Check your understanding

Answer in your own words — write it down before opening the key. Your tutor grades against the criteria and generates fresh variants on retries.

**Q1.** A cloud routine vs a local scheduled job: give the deciding criterion and one example task for each — and explain why the cloud routine cannot do the local job's task.

<details>
<summary>Answer key — attempt every question first</summary>

## Answer key

### Q1

**Model answer:** Criterion: what the job needs to touch. Cloud routines run on hosted infrastructure — repo contents and hosted/remote MCP; they run even with your laptop closed. Local jobs run on your machine — required when the task needs local files, local MCP servers, or machine credentials. The cloud routine cannot read the invoice PDFs sitting in your desktop Downloads folder.

**Pass criteria:** criterion = resource locality; correct always-on vs local-access tradeoff; concrete impossibility example

</details>


**Next:** [Incident Response](/mastering-claude/07-the-always-on-system/30-incident-response/)
