Claude Code can now schedule its own future work. Give it a cron expression and a prompt, and it will enqueue that prompt to fire later — once, or on a recurring schedule — without you sitting there waiting.
That sounds like real crontab. It isn't. The distinction matters, because using session cron where you needed system crontab (or vice versa) is the fastest way to build automation that silently stops working.
What Claude Code Cron Actually Is
Three tools handle it: one to create a job, one to list what's scheduled, one to cancel a job.
Creating a job takes a standard 5-field cron expression — minute, hour, day-of-month, month, day-of-week — plus the prompt to run when it fires, plus a flag for whether it repeats:
# Recurring: every 5 minutes
cron: "*/5 * * * *" prompt: "check the deploy status and report any failures" recurring: true
# One-shot: fire once at a specific time, then auto-delete
cron: "30 14 9 7 *" prompt: "remind me to check the PR before EOD" recurring: false
The cron expression is evaluated in your local timezone — no UTC conversion to do in your head. 0 9 * * * means 9am local, every day. 0 9 * * 1-5 means 9am local, weekdays only.
Listing jobs shows everything currently scheduled in the session. Deleting a job takes the ID that creation returned and removes it. That's the entire surface area — three tools, no config file, no daemon to manage.
The One Gotcha That Matters: Session-Only
Here's the part that trips people up. These jobs live in the session's memory. Nothing is written to disk. When the Claude Code session ends — you close the terminal, the process exits, the context resets — every scheduled job is gone with it.
That's fine for "check on this build in 10 minutes" or "remind me at 2:30 to review that diff." It's the wrong tool for "post to Bluesky every Tuesday at 9:15am forever," because the job doesn't survive past the session that created it, and recurring jobs auto-expire after 3 days regardless.
If you need automation that outlives a single Claude Code session — a job that fires next month, or one that has to survive a laptop reboot — that's what system-level crontab (or a proper scheduler like launchd) is for. We run both in production: Claude Code session cron for in-conversation timing ("check back in 20 minutes"), and real crontab entries wrapped around claude -p headless calls for anything that needs to persist for weeks. Our headless mode guide covers how to script Claude Code from an actual crontab entry.
Recurring vs One-Shot
The recurring flag decides the job's whole lifecycle:
- Recurring (default: true) — fires on every cron match until you delete it or it hits the 3-day auto-expiry. Use this for "every N minutes," "hourly," "weekdays at 9am" style requests.
- One-shot (false) — fires once at the next matching time, then deletes itself automatically. Use this for "remind me at X" or "tomorrow morning, do Y." Pin the minute, hour, day-of-month, and month to exact values so it can't accidentally match again next month.
The 3-day expiry on recurring jobs isn't a bug to route around — it's a deliberate bound on session lifetime. If your automation genuinely needs to run for months, session cron is the wrong layer; move it to real crontab.
Jitter: Why Your Job Doesn't Fire at Exactly :00
The scheduler intentionally avoids letting every Claude Code session on the planet hit the same infrastructure at the same instant. Two mechanisms create spread:
- Recurring jobs can fire up to 10% of their period late, capped at 15 minutes. A job scheduled for every hour might fire up to 6 minutes after the hour; that's expected, not a malfunction.
- One-shot jobs landing exactly on
:00or:30can fire up to 90 seconds early.
The bigger lever is picking an off-minute yourself. Every request for "9am" becomes 0 9 * * *, and every "hourly" request becomes 0 * * * * — which means the whole fleet of scheduled jobs converges on the same second. Pick something that isn't :00 or :30 unless the user named that exact time on purpose: 3 9 * * * instead of 0 9 * * *, 7 * * * * instead of 0 * * * *. Small shift, no meaningful difference to a human reading the schedule, real difference to whatever's on the receiving end.
Runtime Behavior: Jobs Only Fire When Idle
A scheduled job doesn't interrupt Claude Code mid-task. It fires only when the session is idle — between turns, not during one. If you schedule a check-in for every 5 minutes and then kick off a long-running build that takes 20 minutes, the job queues up and fires as soon as the session goes idle again, not exactly on the 5-minute mark. Design around this: session cron is for lightweight check-ins and reminders layered on top of interactive work, not a hard real-time scheduler.
Session Cron vs the /loop Skill
If your Claude Code setup has a /loop command available, it's a thin wrapper over the same idea: /loop 5m /some-command re-runs a prompt or slash command on a fixed interval for the rest of the session, defaulting to 10 minutes if you don't specify one. Same session-only lifetime, same underlying constraint — it stops the moment the session ends. Use /loop when you want a simple "keep checking this every N minutes" without touching the cron tools directly; use the cron tools directly when you need a specific cron expression, a one-shot reminder at an exact time, or the ability to list and cancel jobs individually.
Practical Patterns That Work
# Check-in during a long deploy
cron: "*/10 * * * *" prompt: "check if the canary deploy has finished, report status" recurring: true
# One-time reminder pinned to today's date
cron: "47 16 9 7 *" prompt: "remind me to review the PR before end of day" recurring: false
# Weekday standup prep, off the :00 mark
cron: "53 8 * * 1-5" prompt: "summarize what changed since yesterday's standup" recurring: true
Each of these is scoped to "things worth checking on while I'm still working in this session" — not "automation that has to survive after I close my laptop." That's the line to hold.
The Takeaway
Claude Code's cron tools give you real scheduling primitives — standard cron syntax, one-shot and recurring modes, jitter that's designed on purpose, not a bug — but they're scoped to the life of the session. Nothing persists to disk, and even recurring jobs cap out at 3 days. That's the right tradeoff for in-session reminders and check-ins. For anything that needs to outlive the session — a weekly social post, a nightly report, a monthly backup check — pair Claude Code's headless mode with a real crontab entry instead. Know which layer you're on before you schedule the job, and you won't get surprised when it quietly disappears in three days.
---
Want automation that actually survives past a single session? Our consulting team builds Claude Code and Agent SDK pipelines that run in real production schedulers, not just session memory. Or start with the fundamentals at Like One Academy.