Schedule a One-Off Cloud Job in Claude Code with /schedule
There are two flavors of automation tools: alarm clocks that ring every day at the same time (cron), and parcel pickup reservations that fire exactly once. Both are useful. The trick is having the right tool for each.
Anthropic's Claude Code Routines, launched on April 14, 2026, recently added the second flavor under the name "Schedule a One-Off Run." It fires a routine once at a specific future timestamp, then auto-disables.
What's a Routine?
A routine is a saved Claude Code configuration — a self-contained prompt plus one or more repositories plus connectors — that runs autonomously on Anthropic's cloud. Your laptop can be closed and it still fires.
A routine packages five things:
- Prompt — the self-contained instructions Claude receives at every fire
- Repositories — cloned at the start of each run from default branch
- Environment — network access, env vars, setup script
- Connectors — Slack, Linear, Google Drive (MCP)
-
Triggers — schedule, API (
/fireendpoint), or GitHub events
There are three trigger types: Schedule, API, and GitHub events. The schedule trigger has two flavors — recurring (cron-like) and one-off (today's topic).
How One-Off Runs Work
A one-off schedule fires the routine a single time at a specific timestamp.
— Anthropic docs
After firing, the routine is marked "Ran" in the web UI. To run it again, you have to edit the routine and set a new one-off time, or create a brand new routine.
Timezones are handled for you. You enter a local time, it gets stored as UTC, and Anthropic guarantees wall-clock execution regardless of where the underlying infra lives.
Using /schedule (CLI)
Inside a Claude Code session:
/schedule in 2 weeks, open a cleanup PR that removes the SIGNUP_V2_ENABLED flag
/schedule tomorrow at 9am, summarize yesterday's merged PRs
/schedule next Monday at 3pm KST, run smoke tests on production
Claude converts the natural-language timestamp into an absolute one and asks for confirmation:
Scheduled to fire at: 2026-05-09T15:00:00+09:00 (2026-05-09 06:00 UTC)
Repositories: my-app
Prompt summary: Remove SIGNUP_V2_ENABLED feature flag and open cleanup PR
Confirm? [y/N]
If GitHub isn't connected yet, you'll be guided through /web-setup. Adding API or GitHub-event triggers requires the web UI (claude.ai/code/routines).
The Quota Detail That Matters
Recurring routines hit a daily firing cap. One-off runs do not count against that cap. They consume normal plan usage (Pro/Max/Team/Enterprise) just like an interactive session, but they don't deplete the routine quota.
That means you can be at 100% routine usage and still schedule a cleanup task for 2 weeks from now without it being rejected.
One-Off vs Recurring
| One-Off | Recurring | |
|---|---|---|
| Fires | Once | Every cadence |
| Auto-disables after firing | Yes | No |
| Counts against daily cap | No | Yes |
| Minimum interval | N/A | 1 hour |
| Custom cron expression | N/A | Yes (5-field via /schedule update) |
Where One-Off Runs Beat Other Tools
| Tool | Where it runs | When session ends | Maintenance burden |
|---|---|---|---|
| Routines One-Off Run | Anthropic cloud | Keeps running | None |
Claude /loop
|
Local terminal | Stops immediately | Active session required |
| Desktop scheduled task | Your machine | Machine must stay on | OS-dependent |
| Cron daemon | Your server | Server must stay on | You operate it |
If you've ever maintained a cron server just to run a once-a-month cleanup, this is the rebuke.
Realistic Use Cases
1. Cleanup after rollout
The canonical use case. Ship a feature behind a flag, then schedule its removal:
/schedule in 2 weeks, open a cleanup PR that removes the SIGNUP_V2_ENABLED flag from frontend and backend repos. Update tests. Branch name: claude/remove-signup-v2-flag.
2. Post-deploy follow-up
/schedule in 1 hour, run smoke tests on production and post the result to #deploy-alerts.
3. Forget-me-not reminder
/schedule next Friday at 4pm, summarize this week's merged PRs and draft a release note.
4. Long-horizon tracking
Decision in a meeting that needs revisiting in 30 days? Drop a routine and forget about it.
Research Preview Caveats
This feature is still in research preview. Before relying on it in production:
-
Beta header:
experimental-cc-routine-2026-04-01. Request shapes, response shapes, rate limits, and token semantics may change. Only the last two versions are kept. - API trigger tokens: shown once at creation. Store them in a password manager or your secrets manager immediately — there's no recovery.
- GitHub webhook caps: per-routine and per-account hourly limits. Excess events are dropped.
-
Branch protection: by default, routines can only push to branches starting with
claude/. There's an opt-out (Allow unrestricted branch pushes), but I'd leave it on. - Author attribution: PRs, commits, and Slack messages from a routine are recorded under your user, not a service account. Plan team conventions accordingly.
A Self-Contained Prompt Template
For the cleanup-PR scenario, this is what an actually-runnable prompt looks like:
1. Search the codebase for usages of the feature flag SIGNUP_V2_ENABLED in `frontend/` and `backend/`.
2. Remove all references, treating the flag as permanently enabled.
3. Update unit tests that depended on the previous behavior.
4. Run `npm test` (frontend) and `pytest` (backend). If tests fail, fix and rerun.
5. Open a PR titled "chore: remove SIGNUP_V2_ENABLED feature flag" on branch `claude/remove-signup-v2-flag`.
6. PR body should summarize removed code paths and test results.
7. Add the label "automated-cleanup".
The rule of thumb: write the prompt as if you won't be there to answer follow-up questions.
Wrap-up
One-off runs aren't flashy. They fill the small gap between "do it now" and "set up a cron." But that gap matters in practice — feature-flag cleanups, post-deploy follow-ups, meeting follow-ups all live there.
If you're already using Claude Code, try one this week. Schedule a cleanup PR for 2 weeks from now, then forget about it. When Monday comes around, the PR will be waiting.
Source: code.claude.com/docs/en/routines
Top comments (0)