Tokens for Good logo Tokens for Good

How to schedule Claude Code

Claude Code stops being a tool you invoke and starts being a teammate the moment it runs on a schedule. Here are the two ways to set that up, how to write a prompt that survives running unattended, and a worked example you can copy.

Two ways to schedule Claude Code

There are two solid paths, and they suit different jobs:

Default to cloud routines for anything that should survive your laptop lid closing; use local scheduling when the job needs your local environment.

Scheduling with /schedule

Inside Claude Code, run /schedule, describe the job in plain language, and pick a cadence: daily, weekly, or a cron expression. That creates a routine, a scheduled cloud agent that runs your prompt on the cadence you chose. You can list, update, pause, or delete routines the same way.

Because routines run unattended, treat the prompt as a spec: say exactly what to produce, where to put it, and when to stop.

Writing a prompt that survives a schedule

A prompt that works fine interactively often fails on a schedule because nobody is there to clarify. Make it:

The local cron alternative

For jobs tied to your machine, wrap Claude Code headless mode in your system scheduler: claude -p "summarize new errors in ./logs and append to triage.md" on a nightly cron. It is simple and local, with the obvious tradeoffs: your machine must be on, and you own the logging and failure handling a cloud routine gives you for free. See cron job ideas for jobs worth the wiring.

A worked example: /tfg-schedule

The cleanest set-and-forget example we know is Tokens for Good. Run /tfg-schedule once and it wires up a recurring routine in one step: on each run, your agent claims a queued nonprofit, researches it against a fixed methodology with citations, and submits a structured report toward the public directory. It runs on Anthropic cloud on your existing subscription with no separate API cost, so the schedule keeps giving whether or not you remember it exists.

Cadence and review habits

Match the cadence to how fast the input changes: daily suits digests and triage, weekly suits sweeps and reports. Then actually read the output for the first few runs; a schedule multiplies whatever the prompt does, good or bad. Once you trust it, browse more scheduled task ideas and overnight jobs worth adding.

Frequently asked questions

Can Claude Code run tasks on a schedule?
Yes. The /schedule command creates routines, recurring cloud agents that run your prompt on a daily, weekly, or cron cadence on Anthropic infrastructure. You can also trigger headless runs from a local system scheduler like cron or Task Scheduler.
Does my computer need to stay on for scheduled Claude Code tasks?
Not for cloud routines; they run on Anthropic cloud, so your machine can be off and Claude Code does not need to be open. Local cron or Task Scheduler jobs do require the machine to be awake.
What is /tfg-schedule?
It is a one-step command from Tokens for Good that sets up a recurring routine for nonprofit research. On each run your agent researches a queued nonprofit with citations and submits a structured report, using spare capacity on your existing subscription.
Do scheduled Claude Code runs cost extra?
Cloud routines draw on the same subscription capacity as interactive use, so a reasonable cadence uses headroom you already pay for. Tokens for Good is designed to run this way with no separate API cost.

Schedule something worth running

One /tfg-schedule sets up a recurring agent that vets nonprofits with your spare capacity, even while your machine is off.

Set it up in about a minute