This lesson is being recorded
Every video of this course is being uploaded to my YouTube channel. Subscribe so you do not miss it.
Module 10 · Lesson 10.1 · 13 min
Scheduled Routines
Put a recurring task on a fixed schedule so it runs without you, using the option that fits your business.
Use ← → to move. The marker highlights text and the pencil draws on the slide; navigation locks while you annotate. Undo removes the last mark, Esc exits.
1Pick the routine and write its prompt as a file
Choose one skill that already works well when you run it by hand, such as the weekly ops check from Module 9. Save the full instructions in a prompt file, because a scheduled run cannot ask you follow-up questions. The prompt must say exactly what to read, what to produce, where to save it and what never to do.
Write a self-contained prompt for our weekly operations check and save it as prompts/weekly-ops-check.md. It will run unattended, so include: which files to read, the rules file to apply, the exact output file name with today's date, and the rule that it must never send, delete or overwrite anything. End with: if any input file is missing or older than 3 days, write that clearly at the top of the report and stop.2Option A: a cloud routine
If your files live in a GitHub repository and you use a claude.ai subscription login, you can create a cloud routine with /schedule inside Claude Code, or at claude.ai/code/routines. It runs even when your computer is off, can use your connectors, and each run appears as a session you can review. Routines are a research preview, so check your plan's limits.
/schedule every Monday at 7:10am, run the weekly operations check in prompts/weekly-ops-check.md3Option B: your Mac's scheduler (launchd)
If your files live on your Mac, wrap the headless command in a small script and let launchd run it. The recipe file in this module's materials has the complete script and the launchd file, ready to copy. First, find where claude is installed, because scheduled jobs do not load your normal terminal settings.
command -v claude4Option C: Windows Task Scheduler
On Windows, save the PowerShell script from the recipes file and register it with Task Scheduler. This one command creates a task that runs every weekday at 7:30am. Replace the path with your own.
schtasks /create /tn "AI Weekly Ops Check" /tr "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\ai\weekly-ops-check.ps1" /sc weekly /d MON /st 07:105Run it once by hand, then log every run
Always trigger the routine manually before trusting the schedule, and check the output file. Then add a line to the Routine Run Log for every run: date, routine, status, minutes saved and issues. This log is your evidence in Module 12 when you calculate ROI.
Look at the skills you built in the last modules: the ops check, the aging report, the monthly report, the dashboard. Every one of them still waits for you to remember to run it. And the week you are busiest is exactly the week you forget. A routine that depends on your memory is not a routine.
There are three ways to put Claude Code on a schedule. Cloud routines run on Anthropic's infrastructure even when your laptop is closed. The Claude desktop app can run local scheduled tasks on your machine. And your operating system's own scheduler (launchd or cron on Mac, Task Scheduler on Windows) can run a headless claude -p command at a fixed time. In this lesson you choose one and set up your first routine.
Key points
- A routine that depends on your memory is not a routine.
- Scheduled prompts must be fully self-contained; nobody is there to answer questions.
- Cloud routines run with the laptop closed; local schedulers run where your files are.
- Run it by hand first, then log every scheduled run.
Avoid
- Scheduling a skill that has never worked cleanly by hand.
- Using a relative path to claude that the scheduler cannot find.
- Scheduling exactly on the hour for cloud routines, when a few minutes past starts more reliably.
- Never opening the output, so a broken routine runs silently for weeks.
A roofing company owner in Texas scheduled two routines on the office Mac: a weekly job-costing check on Monday at 6am and a Friday afternoon aging report. The first Monday it ran, the report flagged a job where material costs had already reached 91 percent of the quote with a third of the work left. Before automation, that job would have been noticed at invoicing, three weeks later. He now reads both reports on his phone in the truck before the first site visit.