Schedule Recurring Tasks with Claude Code Loop

Key insights
- The /loop skill schedules recurring prompts that run automatically while your Claude Code session stays open, for up to three days
- Loop works with natural language and pairs with other skills like Firecrawl and Slack MCP for automated workflows
- All scheduled tasks are session-scoped. Close the terminal and they stop. For persistent scheduling, use the desktop app or GitHub Actions
This is an AI-generated summary. The source video may include demos, visuals and additional context.
In Brief
Claude Code now has a built-in /loop skill that lets you schedule recurring tasks directly from your terminal. The video from Developers Digest walks through how to set up loops with natural language, combine them with other skills, and manage scheduled jobs. Boris Cherny, Head of Claude Code at Anthropic, describes Loop as "a powerful new way to schedule recurring tasks for up to 3 days at a time."
What you'll learn
- How to schedule your first recurring task with
/loopor natural language - How to combine loops with other Claude Code skills for automated workflows
- The limitations you need to know: session scope, timing offsets, and expiry
What is Loop?
Loop is Claude Code's built-in scheduling system. It evolved from a community technique called "Ralph Wiggums," which was a way to make Claude Code repeatedly check its own work (0:00).
The problem it solves: when you ask Claude Code to do something complex, it sometimes finishes too early or loses track of the goal after several compaction cycles (when the AI condenses earlier conversation to save memory) (0:22). Loop fixes this by scheduling prompts that fire automatically at regular intervals.
Setting up your first loop
You can schedule a loop in two ways: the /loop slash command, or plain natural language (1:07).
Write your prompt with an interval
Tell Claude Code what you want and how often. For example: "Loop every 4 hours, scrape Hacker News for AI stories and email me a summary." You can use /loop 10m check my PR for build failures or just describe what you want in natural language.
Review the scheduled task
Claude Code confirms the schedule by showing three things: the prompt it will send at each interval, any notes about the task, and the auto-expiry time (currently 3 days) (1:39).
Let it run
The task fires automatically in the background while your session stays open. You can continue working normally. To check your active loops, ask "What scheduled tasks do I have?" and Claude Code will invoke CronList (4:27).
Interval rules and limits
A few things to know about timing:
- Minimum interval: 1 minute. Anything shorter gets rounded up (1:27).
- Maximum duration: 3 days. After that, the loop expires automatically (1:47).
- Scheduling offset: Tasks can fire up to 10% off their set interval. A 4-hour loop might fire at 3 hours 36 minutes or 4 hours 24 minutes. This is intentional: it prevents thousands of users from hitting the API at the exact same moment (5:10).
Practical examples
The video walks through four examples that show what Loop can do.
Auto-fix PRs
"Loop all my PRs, autofix build issues when comments come in, use a Worktree agent to fix them" (0:52). This keeps your pull requests green without lifting a finger.
Slack digest
"Loop every morning, use the Slack MCP to give me a summary of the top posts I was tagged in" (0:57). This uses Model Context Protocol (MCP), a way for Claude Code to connect to external services.
Daily git recap
"Every day at 8 AM, look at my git history and give me a brief update of everything I worked on the day before. Put it on my desktop" (1:51). Claude Code creates a markdown file summarizing yesterday's commits.
Hacker News email automation
The most complex example chains multiple skills together: Firecrawl scrapes the Hacker News front page, filters for AI and development stories, reads the full articles, then sends an email summary via a Gmail CLI skill (3:38).
Managing your loops
Three tools handle everything (5:00):
- CronCreate creates a new scheduled task
- CronList shows all active tasks with their IDs, prompts, and expiry times
- CronDelete cancels a task
You don't need to remember job IDs. Just say "cancel the task that scrapes Hacker News every 4 hours" and Claude Code finds and removes the right one (4:42).
To disable the entire feature, use the --disable-cron flag (5:45).
Practical implications
For solo developers
Start with a simple loop like the daily git recap. It takes 30 seconds to set up and gives you a useful summary every morning. Once you're comfortable, try pairing Loop with MCP integrations.
For teams
Loop can monitor shared resources like PR builds or Slack channels. Set up a loop that watches for failing CI builds and auto-fixes them using Worktree agents, so broken builds don't block the team.
For automation enthusiasts
Chain Loop with skills to build simple automations that would normally need their own setup. The Hacker News email example shows how you can go from data source to formatted email without leaving your terminal.
Glossary
| Term | Definition |
|---|---|
| Loop / /loop | Claude Code's built-in skill for scheduling recurring prompts within a session. |
| Cron job | A scheduled task that runs automatically at specified intervals. Named after the Unix cron utility. |
| Ralph Wiggums | A community technique that predated Loop, where Claude Code would repeatedly check and verify its own work. |
| Compaction cycle | When Claude Code condenses earlier conversation context to save memory. Can cause the AI to "forget" its original goal. |
| Session-scoped | Only active while the specific Claude Code terminal session is open. Closing the terminal stops all session-scoped tasks. |
| MCP (Model Context Protocol) | A protocol that lets AI tools connect to external services like Slack, Gmail, or databases. |
| Skill | A reusable command or workflow in Claude Code, invoked with a slash command like /loop. |
| Worktree | An isolated copy of a git repository for parallel work. Lets Claude Code fix a bug on one branch without touching your current work. |
| Scheduling offset | A small random time variation (up to 10% of the interval) added to prevent all users' tasks from hitting the API simultaneously. |
| Firecrawl | A web scraping tool that can be used as a Claude Code skill to extract content from websites. |
The scheduling workflow also makes more sense if you have read how Claude Code first took shape and how its creator uses the tool to ship 30 PRs a day.
Sources and resources
Want to go deeper? Watch the full video on YouTube →