TheFocus.AI TheFocus.AI
07 the always on system Lesson 29

Routines

The Monday-morning report that writes itself.

~10 min

TUTOR WITH THEFOCUS.AI

Agent Integration

Copy this prompt into Claude, ChatGPT, or any external AI assistant. It points the assistant to the course instructions and links it to your student profile to track your progress and customize observations.

Please tutor me in this lesson using the following context. First, read the instructions at: https://courses.thefocus.ai/llms.txt My Student ID is: <none> The lesson markdown source is at: https://courses.thefocus.ai/mastering-claude/07-the-always-on-system/29-routines.md

You are not enrolled yet. Enroll to generate a Student ID to track lesson completions and store learning notes.

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:

ModeHowWhere It RunsTrade-off
Cloud (Routines)/schedule or claude.ai/code/routinesAnthropic’s infrastructureAlways runs, even with your laptop closed — but sees your repo and hosted MCP servers, not your local machine
LocalScheduled tasks in the Desktop app, or your own cron firing claude -pYour machineFull 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.

Try This

Set up your first routine. Pick something you check every morning — a report, a dashboard, a set of numbers. Use /schedule to automate it.

Cornwall Market's Monday morning routine does this:

1. Pull last week's transactions from QuickBooks (MCP)

2. Categorize any uncategorized ones using the skill

3. Calculate food cost percentage vs previous week

4. Flag any invoices over 30 days overdue

5. Compile everything into a summary

6. Send via Telegram

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.

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.

Answer key — attempt every question first

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

Next: Incident Response

Previous Lesson 29 of 42 Next