The Complete Claude Guide
Chapter 22 · CLI

/goal, /loop, schedules and routines: sustained operation

Four mechanisms let Claude Code work over time: goal steering toward an outcome, loop repeating, schedules firing prompts by time, and routines for standing automation. Distinguishing sustained operation from one-shot tasks matters.

Verified against source on 2026-09-30

Video

Steps

  1. goal sets an outcome the session steers toward and helps hold direction in a long session; phrase a measurable goal.
  2. loop repeats an action on a cadence; it fits monitoring or staged work, with an explicit stop condition.
  3. Scheduled tasks run a prompt at a set time; check what runs when so usage does not pile up unnoticed.
  4. Routines turn a recurring process into automation; start small, verify the result, then expand.
Common pitfall: Sustained automation without oversight is a risk: a wrong scheduled task repeats the mistake until someone notices.
Hands-on exercise: Set a short goal in a trial session and see how it affects behavior. Review existing scheduled tasks and record what runs.
Filmed demo · Video is added in the media phase

Recap

Comprehension check

What should every sustained automation include?

Recap

Official sources

← Previous Back to contents Next →