Claude Code can repeat work automatically in two ways. They look similar but serve different timescales and different situations.
The one-line version
- A scheduled agent runs on a calendar — daily, weekly, on a cron schedule. It works without you present.
/looprepeats a command on a timer during your current session. It stops when you leave.
Scheduled agent — the standing appointment
Every Monday at 9am, pull last week's numbers and draft the team update.
A scheduled agent runs at a set time, does its job, and leaves the result. You don’t need to be at your terminal. It’s like a cron job, but the job is an AI task.
Use a scheduled agent when:
- The task runs on a calendar (daily, weekly, monthly)
- You want it to work without you present
- The result should be waiting for you when you arrive
/loop — the session timer
/loop 5m /babysit-prs
/loop repeats a command every N minutes inside your current session. It’s for polling, monitoring, and checking on things while you’re working.
Use /loop when:
- You want to check something repeatedly right now
- The task is session-scoped (deploy status, test runner, build watcher)
- You’re at your terminal and want live updates
Side by side
| Scheduled agent | /loop | |
|---|---|---|
| Timescale | Hours, days, weeks | Minutes (during a session) |
| Runs without you | Yes | No — session-scoped |
| Setup | Schedule configuration | One command |
| Stops when | You cancel it | Session ends |
| Best for | Standing reports, daily summaries, weekly tasks | Monitoring, polling, live checks |
| Analogy | A calendar reminder | A kitchen timer |
The rule of thumb
“Should this happen while I sleep?”
- Yes → Scheduled agent. Set it, forget it, find the result in the morning.
- No, just while I’m working →
/loop. Quick, lightweight, session-scoped.
Most people start with /loop for immediate needs and graduate to a scheduled agent once they identify a task that should run on a standing cadence.