A Claude Code scheduled task — the current name for what the docs used to call a routine — is a saved configuration: a prompt, one or more repositories and a set of connectors, packaged once so it runs on its own (Automate work with scheduled tasks). It executes on Anthropic-managed cloud infrastructure, or an organization’s self-hosted environment when routed there, so the work keeps going after the laptop closes.

Applies to: Claude Code scheduled tasks (research preview). Adding a GitHub trigger from the CLI needs Claude Code v2.1.225 or later; asking about a task’s run history from the CLI needs v2.1.227 or later.

On this page

Still a research preview

The feature carries its own warning in the docs: “Scheduled tasks are in research preview. Behavior, limits, and the API surface may change.” (Automate work with scheduled tasks) Nothing below should be read as a finished, permanent surface — Anthropic can change the version requirements and endpoint paths named here as the preview evolves.

How it differs from a cron job or a GitHub Action

A cron job or a GitHub Action runs a fixed script wherever you host it. A scheduled task instead hands a full Claude Code cloud session a prompt and a scope: one or more repositories, a cloud environment that controls network access and variables, and the MCP connectors you leave attached. Each run clones the repositories fresh, and Claude pushes its work to a claude/-prefixed branch unless the prompt says otherwise (Repositories and branch permissions).

Three ways to trigger a run

A task can carry more than one trigger at once — the docs give the example of a PR-review task that runs nightly, fires from a deploy script and also reacts to every new pull request (Configure triggers):

  • Schedule — a recurring cadence (hourly, daily, weekly presets, or a custom cron expression that can’t run more often than once an hour), or a one-off run at a specific future time.
  • API — a dedicated HTTP endpoint. POSTing to it with the task’s bearer token starts a session and returns a session URL.
  • GitHub — fires on repository events (pull request, release, issue), with filters such as base branch, labels or draft status.

A task doesn’t need a schedule at all: one with only an API or only a GitHub trigger runs purely on demand.

Creating a task

Create and manage tasks from the web at claude.ai/code/routines, from the Desktop app’s Code tab (Scheduled in the sidebar, then New task), or from the CLI with /schedule (alias /routines). All three write to the same cloud account, so a task created in one shows up in the others immediately.

From the CLI, describe the task in natural language and Claude asks follow-up questions before saving it:

/schedule daily PR review at 9am
/schedule in 2 weeks, open a cleanup PR that removes the feature flag

An API trigger can only be added or managed on the web, not from the CLI. Once added, the task gets a fire URL and a bearer token shown once (Add an API trigger):

curl -X POST https://api.anthropic.com/v1/claude_code/routines/trig_01ABCDEFGHJKLMNOPQRSTUVW/fire \
  -H "Authorization: Bearer sk-ant-oat01-xxxxx" \
  -H "anthropic-beta: experimental-cc-routine-2026-04-01" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"text": "Sentry alert SEN-4521 fired in prod. Stack trace attached."}'

Scheduled tasks belong to the individual claude.ai account that creates them. They’re not shared with teammates, and their runs count against that account’s own usage (Create a scheduled task).

Where “routines” still shows up

The rename didn’t reach every surface. The docs list where the earlier name is still visible (Where the name routines still appears):

  • Some accounts’ app sidebar and button still read Routines / New routine.
  • The web address is still claude.ai/code/routines.
  • The CLI keeps /routines as an alias for /schedule.
  • The API’s /fire endpoint path, its beta header, its response type, and the <routine-fire-payload> tag all keep the old name.
  • The organization toggle that turns the feature off reads Scheduled tasks (Was Routines) or Routines.

Plans and limits

Scheduled tasks are available on Pro, Max, Ultra, Team and Enterprise plans (Automate work with scheduled tasks). Beyond ordinary subscription usage, each way of starting a run has its own hourly limit (Usage and limits):

Action Limit Counted for
Scheduled runs, including one-off runs 100 per hour Your account
Run now, API fires and setting a one-off task to run again 30 per hour Each task (one shared count)
Run now and setting a one-off task to run again 100 per hour Your account
API fires 100 per hour Your account (separate count)

If a GitHub connection is missing or expires when a run is due, the task skips runs for up to 72 hours and then turns itself off until you reconnect (Repositories and branch permissions).

Team and Enterprise Owners can turn scheduled tasks off for every member from Organization settings > Capabilities > Remote sessions; existing tasks stop running and members can’t create new ones while it’s off (Automate work with scheduled tasks).

Where a run actually executes

A run that starts a new cloud session begins in auto mode by default, where a classifier model allows or blocks actions that would otherwise wait for approval; it still stops and waits when an action matches an explicit “ask” rule or hits auto mode’s repeated-block threshold (Permission prompts during a run).

/schedule itself needs a claude.ai subscription login — it doesn’t work signed in only with a Console API key, an Anthropic profile or federation credential, or a cloud-provider login such as Bedrock, Vertex AI or Microsoft Foundry (Troubleshooting).