ع
Learn Tracks Reference Guides Saved
Compare & decide

Scheduled agent vs /loop in Claude Code

Both repeat work automatically — but a scheduled agent is fire-and-forget on a calendar, while /loop is an in-session timer. Pick the wrong one and you're either over-engineering or under-automating.

3 min read · Updated 2026-06-16
Scheduled agent vs /loop in Claude Code

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.
  • /loop repeats 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
TimescaleHours, days, weeksMinutes (during a session)
Runs without youYesNo — session-scoped
SetupSchedule configurationOne command
Stops whenYou cancel itSession ends
Best forStanding reports, daily summaries, weekly tasksMonitoring, polling, live checks
AnalogyA calendar reminderA 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.

Topics

Questions people ask

Does /loop keep running after I close my terminal?
No. /loop runs inside your current session — when the session ends, the loop stops. For work that needs to run without you, use a scheduled agent.
Can a scheduled agent do everything a /loop does?
In principle, yes — but a scheduled agent is heavier to set up. For 'check this every 5 minutes while I'm working,' /loop is much simpler. For 'do this every Monday,' a scheduled agent is the right tool.
How do I see what's scheduled?
Use `/schedule` to list scheduled agents. Active loops are visible in your current session.
Put it into practice
Take the guided course
Start