For months, I’ve been running Claude Code tasks using a homemade cron. A Bash script that starts a headless session, feeds it a prompt, waits for it to finish, and then closes. It works. Barely, but it works. I’ve got it up on GitHub if anyone’s interested.
Then on Friday, with version 2.1.71, Anthropic introduced /loop. A native scheduler. Built directly into Claude Code sessions.
My first reaction was: “They killed my project.”
My second reaction, after trying it: “Not quite. But close.”
What /loop does
The syntax is simple:
/loop 5m check the deploy status
This tells Claude Code: “Every 5 minutes, run this prompt.” Without leaving the session. No cron. No scripts. Claude parses the interval, schedules the task, and runs it as long as the session is open and idle.
You can chain slash commands:
/loop 20m /review-pr 1234
/loop 1h make test 2>&1 | tail -5
Each loop comes with a built-in safety net: it automatically expires after three days. Because forgetting about a rogue cron job is a special kind of pain.
What I’ll use it for
After a day of playing with it, I’ve already got three clear use cases:
1. Monitoring tests while coding. I’m working in Tokamak, implementing something big (five stages of cold start optimization, for instance). Instead of running make test every time I breathe, I just launch:
/loop 10m make test 2>&1 | grep -E "passed|failed"
If something breaks, Claude lets me know without me lifting a finger.
2. Deploy babysitting. When I push a new version and want to know when CI finishes:
/loop 3m gh run list --limit 1
3. Monitoring an API’s status. Just today, I fixed a bug in Tokamak where issues from Claude Desktop were showing up that had nothing to do with Claude Code. While debugging, this would have been super helpful:
/loop 5m curl -s https://status.claude.com/api/v2/incidents/unresolved.json | python3 -c "import sys,json; print(len(json.load(sys.stdin)['incidents']), 'incidents')"
What /loop is NOT
Now, here’s the catch: /loop is an in-session scheduler. Watch out for the implications:
- It dies with the session. Close the terminal, and it’s game over. No persistence.
- Works only when idle. If Claude is busy with a task, the loop waits. It won’t interrupt.
- Maximum lifespan: three days. You can’t leave a loop running for a week.
- No state between runs. Each iteration is treated as a brand-new prompt. No context is carried over.
To put it simply, /loop is watch on steroids. It’s not a cron.
So, why keep using cron?
My claude-cron does something fundamentally different. It starts a new headless session, runs the prompt, and then exits. It doesn’t need an open terminal. It doesn’t need a live session. It runs via launchd (or cron, or systemd, whatever you’ve got) and executes even if you’re fast asleep.
/loop | claude-cron | |
|---|---|---|
| Requires an open session | Yes | No |
| Survives closing the terminal | No | Yes |
| Maximum duration | 3 days | Unlimited |
| Ideal use case | “Keep an eye on this while I work” | “Run this every night at 3am” |
| Complexity | Zero (just one command) | Script + launchd/cron setup |
They’re complementary tools. /loop for ephemeral tasks, claude-cron for long-term jobs.
A real-world example: I have a cron that translates my new blog posts into four languages every night and commits them. /loop can’t do that. I’m not leaving a terminal open all night just so a loop remembers to run at 3am.
But if I’m writing a blog post and want Claude to spell-check it every 15 minutes while I edit… /loop is perfect. I don’t need to spin up any infrastructure for something that only lasts an afternoon.
The future: scheduled tasks
There’s a third contender that’s going to complicate things: Claude Code and Cowork’s scheduled tasks. These are tasks that run in the background, session-free, managed by Anthropic. This is what caused the daylight saving time incident this weekend (an infinite loop trying to process tasks during the missing hour).
When that feature matures, it might actually kill claude-cron. A native scheduler, integrated with authentication, no Bash scripts, no launchd. But that’s the future. Today, scheduled tasks are still in preview and are crashing because of daylight saving time. So my Bash script will keep sitting on the bench a little longer.
In summary
/loop is a brilliant tool for a specific use case: short-lived recurring tasks within your work session. It doesn’t replace a cron job, but it eliminates the need for one in 80% of everyday scenarios.
My workflow now: /loop for keeping tabs on things while I work, claude-cron for overnight tasks, and an eye on scheduled tasks for when Anthropic finally sorts out the daylight saving issues.
Three layers of automation. Each has its place. Sometimes, the solution isn’t picking one tool but knowing when to use each one.