module 10 build routines

Build your first Routine

System Text-to-Speech Ready
Slide: 0:00 / 0:00
Slide 1 of 0Interactive Deck

Full Lesson Reference

Time to build one. You'll create a Routine that runs every weekday morning and posts a summary to a file or channel. The mechanics are the same for any other Routine - once you've done one, you've done them all.

Prerequisite: you need the /schedule skill installed. It's Anthropic's helper for creating and managing Routines from inside Claude Code. If you don't have it yet, tell Claude: install the schedule skill.

The 5 things every Routine needs

  1. A name - short, descriptive, includes the target
  2. A schedule - cron expression or plain English (every Monday 7am AEST)
  3. A prompt - what Claude should do on each run
  4. Context - any files, data references, or skills the run needs
  5. An output destination - where the result goes when the run finishes

Miss any of these and the Routine either fails or does the wrong thing quietly.

Step 1: Create the Routine

In a session, tell Claude what you want

Create a Routine that runs every weekday at 7am AEST.

Name: daily-gads-healthcheck-demo

Job: Pull yesterday's spend, conversions, and cost-per-conversion from Google Ads for account [ID]. Flag any campaign where spend is up 50% vs the previous day. Save a short summary to the daily-healthcheck folder in my GitHub repo. Claude uses the /schedule skill under the hood to create the Routine with the right cron expression, prompt, and metadata. You never write the cron yourself unless you want to.

Step 2: Pick the right cadence

Common cadences in plain English - Claude converts to cron for you:

Every weekday 7am AEST

For morning reports. Runs Mon to Fri before work.

Every Monday 6am AEST

For weekly reports. Runs before the week starts so the draft is waiting.

Every hour

For monitoring or data sync jobs. Keep these cheap - they add up.

First of the month, 5am AEST

For monthly rollups and audits.

Every 15 minutes

Only for real monitoring. Most marketing work doesn't need this frequency.

Step 3: Write the prompt

The prompt is the instruction the agent follows on every run. Treat it like you're briefing a colleague who doesn't share your memory from last week:

  • State the goal in one sentence
  • List the exact steps in order
  • Specify the output format (file name, channel, table)
  • Define what to flag, skip, or escalate
  • Include the date range rule ("yesterday" is ambiguous - use "the 24 hours ending midnight AEST")

If you wouldn't trust a new team member to run this from the prompt alone, the prompt needs more detail.

Step 4: Test the Routine before letting it run

Don't wait until 7am Monday to find out your prompt is wrong. Tell Claude:

Run the daily-gads-healthcheck-demo Routine now as a test. Show me the output.

The Routine fir es once on demand. You inspect the output. If it's wrong, iterate on the prompt. If it's right, leave it to run on the schedule.

Step 5: List and manage your Routines

Tell Claude

  • "List my active Routines" - shows every Routine with its schedule and last run status
  • "Pause the [name] Routine" - stops it firing without deleting
  • "Delete the [name] Routine" - removes it entirely
  • "Change the [name] Routine to run daily at 9am instead" - updates the schedule

Power-user tips

  • Always test before deploying - run once manually, verify output, then turn the schedule on
  • Use AEST explicitly - Routines run in UTC by default, "7am" in the prompt is ambiguous
  • Keep prompts under 500 words - longer prompts get expensive per run. Offload detail into a bundled context file (next lesson).
  • Name with a prefix - daily-, weekly-, monthly-prefix es make the Routines list sort logically
  • Write the cron expression in a comment - even when Claude generated it, note the plain English cadence somewhere so future-you knows what it does

Action items

☐ Install the /schedule skill if you don't have it

☐ Pick the one Routine from Lesson 2 (highest run frequency + safe to run unattended)

☐ Tell Claude to create it with a clear name, schedule, and prompt

☐ Run it manually once - verify the output before turning the schedule on

☐ List your Routines - confirm it shows as active

Next lesson: Context + secrets.

Exercises

  1. Review the concepts covered in this lesson: Build your first Routine.
  2. Write down your key takeaway from this lesson.
  3. Practice running any commands or prompts mentioned above inside your terminal.