Up to 59% offLaunch prices on every plan while spots last.See pricing
KANBANMCP
Sign inStart free

Claude Code Cloud Scheduled Tasks: Setup and Troubleshooting

9 min read

Key takeaways

  • Cloud scheduled tasks fire even when your laptop is off, but they cannot reach local repos, .env files, or locally authenticated tools, which belong on desktop cron.
  • Write each task prompt as a handoff note for a fresh agent: name the files, the goal, and what done looks like, and require a written note every run.
  • A green run status only means the session completed; read the diff and the run log to confirm the agent actually did the work.
  • Most broken setups come down to timezone mismatches, invalid cron expressions, skipped firings while a previous run executes, or silent quota exhaustion.
  • Test MCP servers and credentials interactively before trusting them on a schedule, and start at one firing per hour per project to protect your quota.

Claude Code cloud scheduled tasks let you run cron jobs in the cloud that fire a prompt against your repo on a schedule, no open session required. This guide walks you through creating your first task, verifying it actually ran, inspecting the output, and fixing the failure modes real users hit: missed firings, MCP servers not loading, and quota burn from runs that do nothing useful.

What are Claude Code cloud scheduled tasks and when should you use them vs desktop scheduled tasks?

Cloud scheduled tasks are cron-style jobs that run a Claude Code session on Anthropic's infrastructure on a schedule you define, with a run history you can inspect afterwards. Anthropic's docs cover the setup, cron syntax, and run history (Claude Code docs). The output lands where your agents can pick it up, which matters when you're running several sessions across projects and want the result on a board like KanbanMCP's Claude Code integration rather than buried in a chat.

When cloud wins: no machine running

If your laptop is closed when the cron fires, a local job does nothing. Cloud runs fire regardless, so overnight repo sweeps, dependency checks, and morning summaries actually happen.

When desktop cron wins: local files and credentials

Anything touching local-only state — a git repo on your machine, credentials in your .env, tools authenticated against your user account — belongs on desktop cron. Cloud sessions can't reach them.

SituationCloudDesktop cron
Laptop off overnightWorksMisses
Local repo or .env accessNoYes
Run history in one placeYesYou build it

How do you create your first scheduled task in Claude Code cloud step by step?

Open your repo in Claude Code on the web, then find the scheduled tasks panel in the session sidebar. Click "New task", pick the repo, and you're three fields away from your first cron.

Pick the repo and branch

Choose the branch your agents actually work on, not main by default. If your agents commit to a working branch, schedule against that so the task sees their latest changes. A task running on a stale branch will "fix" things that are already fixed.

Write the prompt like a handoff note

Write the prompt as if briefing a fresh agent with zero memory of previous sessions. Name the files, the goal, and what "done" looks like. Vague prompts produce sessions that burn quota and leave nothing behind.

Worked example:

Check the failing tests in src/payments/. Fix the smallest one. Run the test suite, commit only if green, and leave a note in NOTES.md describing what you changed and what's still broken.

That last sentence matters: if you hand work between agents on a board, a written note is how the next one picks up cleanly. We wrote more about that pattern for multi-agent handoffs.

Set the cron expression

Enter a standard cron string, like 0 9 * * * for 9am daily. Start with once a day, not every 15 minutes, so a broken prompt doesn't quietly eat your quota overnight. Save, then check the next section for verifying it actually ran.

How do scheduled tasks differ from routines in Claude Code?

Scheduled tasks are cron-style jobs that fire in Claude Code cloud on a fixed schedule, run to completion without you, and leave their output for you to inspect later. Routines are the desktop-side pattern: a prompt template an agent runs inside an active session, typically triggered by you opening it. The distinction that matters is who wakes the agent up. Scheduled tasks run whether or not a session is open; routines do not. Anthropic's documentation covers the cloud scheduling surface at Claude Code docs.

For handoffs, scheduled tasks pair well with a board where the next agent picks up the card: the pattern we use on KanbanMCP's Claude setup.

How do you verify a scheduled task actually ran and inspect its output?

A run that fires is not a run that worked. Claude Code cloud keeps a run history per scheduled task: open the task and check the timestamp, exit status, and session transcript for each firing. A green checkmark only means the session completed, not that the agent did real work.

Reading the run log

Open the latest session and read the last few assistant turns. You are looking for concrete claims: files touched, commands run, tests executed. If the log ends with "looks good" and no tool calls, the run produced nothing. Treat chat sessions as disposable; the log is your only record of what happened.

Checking the diff, not the summary

Summaries lie by omission. Compare the actual diff or generated output against the task's intent. Two minutes of reading the diff beats trusting a paragraph of agent prose. If the diff is empty or unrelated, the task failed silently even though the run "succeeded."

Alerting yourself when a run fails

Cloud runs won't ping you. Have the task write a one-line status to a card on your board so the next agent, or you, picks it up. We route our own scheduled agent runs through Muse Code the same way: a claimed card, a completion note, and a visible failed state you can steer from.

Why is my Claude Code scheduled task not firing, and how do you fix common failure modes?

Three failure modes cover most broken cron setups: the task never fires, it fires but does nothing, or it fires and burns quota on a useless run.

Task never fires

Check the timezone first. Cloud tasks run on the workspace timezone, not your laptop's, so "9:00" can mean a firing that already happened while you slept. Confirm the cron expression is valid — test it against a parser like crontab.guru before pasting it in. Missed firings also happen when a previous run of the same task is still executing; most schedulers skip rather than queue.

Task fires but does nothing

Silent failures usually mean the run had no way to signal completion. If your task writes output, have it write to a file or a card every run, even on failure. A run that exits quietly with no artifact is indistinguishable from a run that never happened. This is where a shared board beats chat history: an agent that claims a card and leaves a note for the next one gives you a paper trail without extra tooling. We use the same pattern with qwen-code — the card is the receipt.

Task burns quota on a useless run

The most expensive failure is a task that fires on schedule, hits its rate limit mid-run, and produces half-finished output you only notice a week later. Anthropic documents usage limits and rate limits for Claude Code, and quota exhaustion is silent: the task shows as completed, the work is not there (Claude Code usage limits). Fix it by making every run idempotent — the agent should check whether the previous run finished before starting new work, and log the quota state in its handoff note so the next firing knows where it stopped.

How do you schedule tasks that use MCP servers or external tools reliably?

A scheduled task runs headless, so any MCP server or CLI tool that works in your interactive session can silently fail in the cron. The fix is boring: prove the setup works interactively before you trust it on a schedule.

Test the MCP setup interactively first

Open a Claude Code session in the same repo, run the exact prompt your cron will use, and confirm the MCP server loads and the tool call succeeds. If the server needs an auth handshake or a browser popup, do it once manually so the token is cached. Then run the scheduled task once at a near-future time instead of waiting a day to discover it broke.

Scope credentials for headless runs

Scheduled runs have no terminal in front of them, so anything that prompts for input fails quietly. Put API keys and tokens in environment variables the task can read, not in a script that asks for them. For git pushes or deploys, use a token with the narrowest scope that works. If a tool writes state you care about, like a KanbanMCP card or a note in your system of record, have the task confirm the write in its output so a silent failure shows up when you inspect the run.

What limits, pricing, and quotas apply to cloud scheduled tasks?

Scheduled tasks draw from the same usage pool as your interactive sessions, so a cron firing every 15 minutes can quietly eat the quota you need for actual coding. Anthropic documents how headless sessions load MCP servers and consume context the same way interactive ones do (Claude Code docs), which means a task that "just checks the board" still pays for full session startup.

Rule of thumb for sizing schedules: start at one firing per hour per project, watch two or three runs, then tighten only if the task's output shows it finished well under budget. Batch related work into one cron rather than several. If a task fails silently near the end of a billing window, assume quota exhaustion before debugging anything else.

How do you hand scheduled task output to your next agent without losing context?

Write results to a board card, not a chat

A cron run that ends in a chat session is gone the moment you open a new one. Treat the scheduled task as working memory and the board as the system of record: the agent writes a short note to the card it worked on, marks the card done or blocked, and lets the session die. Weeks later you can recover the context of the project from the card history, not from scrolling hundreds of chats.

A worked loop: cron claims a card, next agent picks it up

Set the cron prompt to one sentence: claim the top card tagged cron, do the work, leave a note for the next agent, move the card left or right. The next run, or your daytime agent, picks up the card and reads the note before touching code. You watch both from the same board and steer by editing cards, not by re-briefing agents.

Honest limit: a board note is a summary, so if the agent skips writing it, the handoff loses detail. Make "leave a note" part of the prompt itself, not an afterthought.

FAQ

Can a Claude Code cloud scheduled task open a pull request on its own?

Yes, if the prompt tells it to and the repo's credentials allow a push. The session runs headless with the same tool access as an interactive one, so git operations work as long as the token is scoped for it and nothing requires interactive input. Have the task confirm the PR URL in its output so a silent failure shows up in the run history.

Do scheduled tasks still run if my laptop is off?

Yes. Cloud tasks execute on Anthropic's infrastructure, so the firing happens whether or not any of your machines are awake, which is the main reason to pick cloud over desktop cron for overnight sweeps. The tradeoff is access: the session cannot reach local-only state, so anything touching files on your machine or local credentials belongs on desktop cron instead.

How many scheduled tasks can I run before hitting rate limits?

There is no fixed task count; the limit is usage. Every firing draws from the same pool as your interactive sessions and pays for full session startup, even one that just checks the board. Start at one firing per hour per project, watch a few runs, and tighten only if the output shows the task finished well under budget. Batch related work into a single cron.

Can I edit a scheduled task's cron after creating it, or do I need to recreate it?

You can edit it. Open the task from the scheduled tasks panel in the session sidebar and change the schedule or prompt without rebuilding from scratch. After editing, treat the next firing as a test: check the run history to confirm the new cron fired when you expected, since a timezone mismatch can make an edited schedule land hours off.