Automation & Cloud Execution/Local Automation & CI/CD
Intermediate10 min

Scheduled Agents and Recurring Automation

The /schedule command creates recurring remote agents that run on cron schedules, separate from your interactive session. This article covers the difference between scheduled agents, hooks, and /loop — and when to use each.

Quick Reference

  • /schedule creates, lists, and manages recurring remote agents on cron schedules
  • Scheduled agents run independently of any interactive session
  • Use cases: daily code quality reports, weekly dependency audits, nightly test runs
  • Hooks respond to Claude Code events; scheduled agents run independently on a timer
  • RemoteTrigger allows external systems (CI, webhooks) to trigger Claude Code sessions
  • Desktop UI provides a visual scheduler for creating and managing scheduled tasks
  • Scheduled agents still require the machine to be on — Routines handle cloud-hosted execution
  • Cost: every scheduled run consumes tokens — scope task and model carefully

What Scheduled Agents Are

Scheduled agents are recurring Claude Code sessions that run on a cron schedule, independently of any interactive session you have open. Unlike /loop (which runs inside a session you started), scheduled agents are registered with the Claude Code runtime and fire even when you're not actively using Claude Code.

Machine Dependency

Scheduled agents run on your local machine using the Claude Code Desktop app or daemon. They require the machine to be running and the Claude Code service to be active. For true cloud-hosted automation that runs when your laptop is closed, Routines are the answer (covered in the next chapter).

Think of scheduled agents as cron jobs that are aware of your codebase. They can read files, run git commands, check CI status, generate reports, and interact with MCPs — all the capabilities of a full Claude Code session, just initiated on a schedule rather than by you.