Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.
Scheduled tasks are in research preview. Behavior, limits, and the API surface may change.
A cloud scheduled task, formerly a routine, is a saved Claude Code configuration: a prompt, one or more repositories, and a set of connectors, packaged once and run automatically. Scheduled tasks execute on Anthropic-managed cloud infrastructure, or on your organization’s self-hosted environment when routed there, so they keep working when your laptop is closed.Each scheduled task can have one or more triggers attached to it:
Schedule: run on a recurring cadence like hourly, nightly, or weekly, or once at a specific future time
API: trigger on demand by sending an HTTP POST to the task’s own endpoint with a bearer token
GitHub: run automatically in response to repository events such as pull requests or releases
A single scheduled task can combine triggers. For example, a PR review task can run nightly, trigger from a deploy script, and also react to every new PR.A scheduled task doesn’t need a schedule:
A task with only an API trigger runs when you call its endpoint.
A task with only a GitHub trigger runs when a matching repository event occurs.
Scheduled tasks are available on Pro, Max, Team, and Enterprise plans. Create and manage them at claude.ai/code/routines, or from the CLI with /schedule. The earlier name, routines, still appears.
Team and Enterprise Owners can turn off scheduled tasks for all members with the Scheduled tasks (Was Routines) toggle at Organization settings > Capabilities > Remote sessions. When the toggle is off, existing scheduled tasks stop running and members can’t create new ones.If your Enterprise organization manages your access with custom roles, you also need a role that includes the scheduled tasks permission. An Owner can add it in a role’s Remote sessions section at Organization settings > Roles.
Each example pairs a trigger type with the kind of work scheduled tasks are suited to: unattended, repeatable, and tied to a clear outcome.
Backlog maintenance: a schedule trigger runs every weeknight in your repository, with your issue tracker added as a connector. The scheduled task reads issues opened since the last run, applies labels, and assigns owners based on the area of code referenced. It then posts a summary to Slack so the team starts the day with a groomed queue.
Alert triage: your monitoring tool calls the scheduled task’s API endpoint when an error threshold is crossed, passing the alert body as text. The task’s prompt tells Claude to investigate the alert in the fire payload, so it pulls the stack trace and correlates it with recent commits in the repository. It then opens a draft pull request with a proposed fix and a link back to the alert. On-call reviews the PR instead of starting from a blank terminal.
Bespoke code review: a GitHub trigger runs on pull_request.opened. The scheduled task applies your team’s own review checklist and leaves inline comments for security, performance, and style issues. It also adds a summary comment so human reviewers can focus on design instead of mechanical checks.
Deploy verification: your CD pipeline calls the scheduled task’s API endpoint after each production deploy. The task runs smoke checks against the new build, scans error logs for regressions, and posts a go or no-go to the release channel before the deploy window closes.
Docs drift: a schedule trigger runs weekly. The scheduled task scans merged PRs since the last run, flags documentation that references changed APIs, and opens update PRs against the docs repository for an editor to review.
Library port: a GitHub trigger runs on pull_request.closed filtered to merged PRs in one SDK repository. The scheduled task ports the change to a parallel SDK in another language and opens a matching PR, keeping the two libraries in step without a human re-implementing each change.
Create a scheduled task from the web at claude.ai/code/routines, from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a scheduled task you create in one shows up in the others immediately. In the Desktop app’s Code tab, click Scheduled in the sidebar or in the sidebar’s More menu, then New task, and continue with Create from the web.Scheduled tasks run autonomously as full Claude Code cloud sessions. The session runs shell commands, uses skills, and calls any connectors you include. Outside a project’s threads, those skills include the ones committed to the cloned repository. You don’t choose a permission mode when you create the task: see Permission prompts during a run for when a run stops to wait for you.What a scheduled task can reach is determined by:
Scope each of those to what the task needs.Scheduled tasks belong to your individual claude.ai account. They are not shared with teammates, and their runs count against your account’s usage and limits. Anything a scheduled task does through your connected GitHub identity or connectors appears as you. Commits and pull requests carry your GitHub user, and Slack messages, Linear tickets, or other connector actions use your linked accounts for those services.
Go to claude.ai/code/routines and click New task to open the New scheduled task dialog. Check for these screens before you continue:
If the button reads New routine instead of New task, click New routine and continue with Full-page form.
In the Desktop app, if a menu with Local and Cloud opens, go to Full-page form.
If a menu opens with Create with Claude and Set up manually, select Set up manually to open the dialog. Create with Claude lets you describe the task in a chat and have Claude create it instead.
If a full page opens in place of the dialog, go to Full-page form.
If Repositories and Environment are already showing when the dialog opens, see how that dialog differs. Otherwise, this dialog also creates scheduled tasks for claude.ai chat. To make yours what the dialog calls a Claude Code task, select a repository or add a GitHub event or API trigger in the steps that follow. That kind of task runs Claude Code in a cloud session.
2
Name the task and write the prompt
Give the scheduled task a descriptive name and write the prompt Claude runs each time. The prompt is the most important part: the task runs autonomously, so the prompt must be self-contained and explicit about what to do and what success looks like.When a trigger fires, the session receives the saved prompt as its assignment and carries it out, rather than treating it as untrusted content that arrived mid-conversation. The trigger attests only that the prompt was stored ahead of time by an authorized session on your account. The fired prompt is therefore not live user input and can’t act as approval or consent for actions during the run. Content the session fetches during the run keeps its normal handling.
3
Select a trigger
In the Trigger row, choose how the task starts. To combine several triggers, click + at the end of the row.
Schedule
GitHub event
API
Pick a preset frequency for a recurring run. See Add a schedule trigger for timezone handling, late starts, custom cron intervals, and one-off runs.
Select the repository, the event to react to, and optional filters. See Add a GitHub trigger for the full list of supported events and filter fields.
Select API here. When you click Create, the API token dialog shows the token once, so copy it before you close the dialog. See Add an API trigger to copy the URL or generate a new token.
4
Select repositories
Expand Advanced settings. Under Repository on the General tab, select one or more GitHub repositories for Claude to work in.Each repository is cloned at the start of a run. Claude creates claude/-prefixed branches for its changes.
5
Select an environment
After you select a repository, Cloud environment appears below it. Pick a cloud environment for the task. Environments control what the cloud session has access to:
Network access: set the level of internet access available during each run
Environment variables: provide values Claude can use during each run. They’re visible to anyone who uses the environment, so in an Anthropic-hosted environment, store keys for the APIs Claude calls during a run as network secrets instead. That section also lists the requests that never get a secret
Setup script: install dependencies and tools the task needs. The result is cached, so the script doesn’t re-run on every session
A Default environment is provided with Trusted network access, which allows only the default allowlist of package registries, cloud provider APIs, container registries, and common development domains through the session’s network. Connectors you add to the task reach their services through Anthropic’s servers, so they don’t need allowlist changes.If your task needs to reach your own services directly, or a domain outside that list, edit the environment’s network access before running. To use a separate environment, create one first.
6
Select a model and effort level
Select a model in the prompt input’s model selector for Claude to use on every run. For a Claude Code task, if the model offers effort levels, Effort in the same selector shows the current level. To change it, select another level. The selector’s Default option offers no levels.
7
Review connectors
Switch to the Connectors tab of Advanced settings. All of your connected MCP connectors are included by default. Remove any the task doesn’t need: Claude can use an included connector during a run, including writes. For when a run stops to ask you first, see Permission prompts during a run.
8
Create the task
Click Create. The dialog closes and the new task’s detail page opens. The task runs the next time one of its triggers matches. To start a run immediately, click Run now on the detail page.To see what a run did, click it in the History list on the detail page. The run opens as a full session, a new one for each run, where you can see what Claude did, review changes, and create a pull request.
Dialog with Repositories and Environment in the main view
Follow the steps to create from the web, and fill in each field in the dialog’s main view rather than under Advanced settings. This dialog creates only Claude Code tasks.Select the repository before you add a GitHub event trigger, because that trigger is unavailable until a repository is selected.
In the Desktop app, if a menu with Local and Cloud opens, select Cloud. A page titled New routine or New scheduled task opens. Fill in its fields:
Name: enter one.
Instructions: enter the prompt. In the same box, select the model, the effort level if the model offers one, the repositories, and the environment. For what each one controls, see the steps under Create from the web.
Select a trigger: select Schedule, GitHub event, or API. For a schedule, see Add a schedule trigger. For a GitHub event, select a repository. For an API trigger, copy the token from the API token dialog that opens after you click Create, because it is shown once. To combine several triggers, click Add another trigger.
Connectors: all of your connected connectors are included by default, so remove the ones the task doesn’t need.
If Create is unavailable, hover over it to see what the form still needs. Click Create, and the task’s detail page opens.
Run /schedule in any session to create a scheduled task conversationally. You can also pass a description directly, for a recurring task like /schedule daily PR review at 9am or a one-off like /schedule clean up feature flag in one week. Claude walks through the same information the web dialog collects, then saves the task to your account. The command is also available under the alias /routines.A successful start looks like a conversation: Claude asks follow-up questions about the schedule, repositories, and prompt before saving. If Claude instead replies that you need to authenticate or that it can’t connect to your remote claude.ai account, no scheduled task was created; see Troubleshooting.A task you create with /schedule has a schedule trigger. You can also add the other trigger types:
GitHub trigger: edit the task on the web, or ask Claude in the CLI. Adding one from the CLI requires Claude Code v2.1.225 or later
A scheduled task with no schedule trigger, such as one started only by API calls or GitHub events, has no next run time. The CLI shows none when Claude saves or updates it.
A scheduled task starts when one of its triggers matches. Add or remove a task’s triggers at any time in the Trigger row of the task’s edit dialog.When a task has two or more triggers, each one has a trash icon in that dialog. To remove a schedule or GitHub event trigger, click its trash icon, then Save changes. To remove an API trigger, delete its token instead.
A schedule trigger runs the task on a recurring cadence, or once at a specific future time. In the task’s creation or edit dialog on the web, pick a preset frequency such as hourly, daily, or weekly:
Runs on the hour: if you schedule a run exactly on the hour, such as 9:00, it can start several minutes late. To start close to the scheduled time, pick a few minutes past the hour, for example 9:07.
Custom intervals: for a cadence the presets lack, create the task and select Custom in its edit dialog. Then enter a cron expression, such as 0 */2 * * * for every two hours. To set one from the CLI, run /schedule update. Expressions that run more often than once per hour are rejected.
Time zone: when you pick a preset frequency, enter the time in your local time zone.
Cron expression time zone: when the expression is five fields alone, write the hours in UTC, so 0 9 * * 1-5 runs at 9:00 AM UTC on weekdays. If the field opens with a CRON_TZ= prefix, keep it and write the hours in its zone, or delete it and write them in UTC.
A one-off schedule runs the task a single time at a specific timestamp. For example, use it to:
Remind yourself later in the week
Open a cleanup PR after a rollout finishes
Start follow-up work after an upstream change ships
After the task runs, it turns itself off and the web UI marks it as Completed. To run it again, open the task’s edit dialog on the web and select One-time or Once, whichever label your dialog shows. Then set a new date and time in your local time zone and save.Create a one-off run from the CLI by describing the time in natural language. Claude resolves the phrase against the current time and confirms the absolute timestamp before saving.
/schedule tomorrow at 9am, summarize yesterday's merged PRs
/schedule in 2 weeks, open a cleanup PR that removes the feature flag
One-off runs count against the same hourly limit as other scheduled runs. See Usage and limits for details.
An API trigger gives a scheduled task a dedicated HTTP endpoint. POSTing to the endpoint with the task’s bearer token starts a new session and returns a session URL. Use this to wire Claude Code into alerting systems, deploy pipelines, internal tools, or anywhere you can make an authenticated HTTP request.Add an API trigger on the web, either while you create the task or later with the steps below. You can’t add an API trigger or manage its token from the CLI.
1
Open the task for editing
Go to claude.ai/code/routines, click the scheduled task you want to trigger via API, then open the menu next to its name and select Edit. The Edit scheduled task dialog opens.
2
Add an API trigger
In the Trigger row, click + and select API from the menu that opens. A panel with the Fire URL and Token for this task appears.
3
Copy the URL and generate a token
Copy the Fire URL. Click Generate token, then copy the token from the Token generated dialog immediately. The token is shown once and can’t be retrieved later, so store it somewhere secure such as your alerting tool’s secret store.The API trigger takes effect as soon as you generate the token. You don’t need to click Save changes, so close the dialog when you’re done.
4
Call the endpoint
Send the token in the Authorization: Bearer header when you POST to the URL. Trigger a scheduled task shows a complete example.
Each scheduled task has its own token, scoped to triggering that task only. To turn off API access or rotate the token, open the task’s Edit scheduled task dialog again. Both controls are next to the token in the API trigger’s panel and take effect immediately:
Turn off API access: click Delete token, the trash icon next to Regenerate. This removes the API trigger
Rotate the token: click Regenerate. The previous token stops working, and the Token generated dialog shows the new one once
Send a POST request to the /fire endpoint with the bearer token in the Authorization header. The request body accepts an optional text field for run-specific context such as an alert body or a failing log, passed to the task alongside its saved prompt. The value is freeform text and is not parsed: if you send JSON or another structured payload, the task receives it as a literal string.The text value doesn’t reach the routine as a bare message. It arrives wrapped in a <routine-fire-payload> block that labels it as untrusted data and tells Claude not to follow instructions inside it unless the routine’s own prompt says to. The same wrapping applies to text supplied with Run now in the web UI.This means a routine’s saved prompt must opt in to acting on fire text: write the prompt to reference the payload explicitly, for example “Investigate the alert described in the routine-fire-payload block”, or the routine treats the text as inert context. Anyone holding the bearer token can send text, so the wrapper makes fire text from a leaked token arrive labeled as untrusted data rather than as direct instructions to your routine.The example below triggers a scheduled task from a shell. The task ID and token shown are placeholders: replace them with the URL and token you copied when adding the API trigger, or the request fails with a 401 authentication error:
Open the session URL in a browser to watch the run in real time, review changes, or continue the conversation manually.
The /fire endpoint ships under the experimental-cc-routine-2026-04-01 beta header. Request and response shapes, rate limits, and token semantics may change while the feature is in research preview. Breaking changes ship behind new dated beta header versions, and the two most recent previous header versions continue to work so that callers have time to migrate.
For the full API reference, including all error responses, validation rules, and field limits, see Trigger a routine through the API in the Claude Platform documentation.The /fire endpoint is available to claude.ai users only and is not part of the Claude Platform API surface.
A GitHub trigger starts a new session automatically when a matching event occurs on a connected repository. Claude Code doesn’t reuse sessions across events, so two PR updates produce two independent sessions.
GitHub webhook events are subject to per-task and per-account hourly caps. Events beyond the limit are dropped until the window resets.
The Claude GitHub App must be installed on the repository you want to subscribe to, whichever surface you configure the trigger from.
Configure GitHub triggers from the web UI, which prompts you to install the app when it’s missing. Follow the steps below to configure one on the web.
From the CLI, install the app from the GitHub App page first, then ask Claude to attach a GitHub trigger to an existing scheduled task, for example /schedule add a GitHub trigger to my nightly review for pull requests opened in acme/webapp. The CLI path requires Claude Code v2.1.225 or later. When Claude adds the trigger, it replies with a link to the task the trigger fires.
1
Open the task for editing
Go to claude.ai/code/routines, click the scheduled task, then open the menu next to its name and select Edit. The Edit scheduled task dialog opens.
2
Add a GitHub event trigger
In the Trigger row, click + and select GitHub event from the menu that opens.
Running /web-setup in the CLI grants repository access for cloning, but it does not install the Claude GitHub App and does not enable webhook delivery.
3
Configure the trigger
Change the repository if needed, choose an event from the supported events list, and optionally add filters. Then click Save changes at the bottom of the dialog to apply the trigger.
Choose an event from any of the following categories. Within each category you can pick a specific action, such as pull_request.opened, or react to all actions in the category.
Event
Triggers when
Pull request
A PR is opened, closed, assigned, labeled, synchronized, or otherwise updated
Release
A release is created, published, edited, or deleted
Issue
An issue is opened, edited, closed, reopened, labeled, assigned, or otherwise updated
Use filters to narrow which pull requests start a new session. All filter conditions must match for the scheduled task to trigger. The available filter fields are:
Filter
Matches
Author
PR author’s GitHub username
Title
PR title text
Body
PR description text
Base branch
Branch the PR targets
Head branch
Branch the PR comes from
Labels
Labels applied to the PR
Is draft
Whether the PR is in draft state
Is merged
Whether the PR has been merged
Each filter pairs a field with an operator: equals, contains, starts with, is one of, is not one of, or matches regex.The matches regex operator tests the entire field value, not a substring within it. To match any title containing hotfix, write .*hotfix.*. Without the surrounding .*, the filter matches only a title that is exactly hotfix with nothing before or after. For literal substring matching without regex syntax, use the contains operator instead.A few example filter combinations:
Auth module review: base branch main, head branch contains auth-provider. Sends any PR that touches authentication to a focused reviewer.
Ready-for-review only: is draft is false. Skips drafts so the task only runs when the PR is ready for review.
Label-gated backport: labels include needs-backport. Triggers a port-to-another-branch task only when a maintainer tags the PR.
Click a scheduled task in the list to open its detail page. The detail page shows the task’s repositories, connectors, prompt, schedule, API tokens, GitHub triggers, and a list of past runs.
Click any run to open it as a full session. From there you can see what Claude did, review changes, create a pull request, or continue the conversation. Each run session works like any other session: use the dropdown menu next to the session title to rename, archive, or delete it.Under History on the task’s detail page, each finished run’s row ends with Error if the run failed, Cancelled if it was cancelled, and neither word if it succeeded. The Status filter names the same three outcomes Failed, Cancelled, and Succeeded. These outcomes say how the session ended, not whether Claude completed the work your prompt describes, so open the run and read its transcript to see what happened.
Succeeded: the session ended without Claude Code reporting a failure. Blocked network requests, missing connector tools, and work Claude couldn’t complete appear in the transcript rather than on the row
Failed: the session didn’t finish normally. For example, it stopped unexpectedly, ended on an error, or was archived before the run started
Cancelled: the run didn’t fail, and its session was archived. If you archive the session of a run that succeeded, the run changes to Cancelled. Nothing in the task needs to change
Click Run now to start a run immediately without waiting for the next scheduled time.
Use the on/off switch at the top of the page to pause or resume the schedule. Paused tasks keep their configuration but don’t run until you turn them back on.
Open the menu next to the task’s name and select Edit to change the name, prompt, repositories, environment, connectors, or any of the task’s triggers. The Edit scheduled task dialog opens with the same layout as the creation dialog. To add a trigger, click + in the Trigger row. Click Save changes to apply your edits. API token actions take effect immediately, without Save changes.
Open the same menu and select Delete to delete the task.
Run /schedule list to see your scheduled tasks, /schedule update to change one, or /schedule run to start one immediately.You can also ask about a scheduled task’s run history, for example /schedule why did my nightly review do nothing this morning?. Claude lists the task’s recent runs with their status and a link to open each run on the web. It also reads a run’s log to explain what happened, including tool errors, permission denials, and the final result. Requires Claude Code v2.1.227 or later.
Scheduled tasks need GitHub access to clone repositories. When you create a scheduled task from the CLI with /schedule, Claude checks whether your account has GitHub access for the repository you ran it from. If it doesn’t, Claude adds a setup note naming how to grant it.
See GitHub authentication options for the two ways to grant access. On Team and Enterprise plans, an Owner of your Claude organization has to turn on each method before you can use it; see Connect GitHub.
If your GitHub connection is missing or expired when a run is due, the scheduled task skips runs until you reconnect, for up to 72 hours. Reconnect GitHub within that window and the task resumes on its own. After 72 hours without a connection, the task turns off, and you turn it back on after reconnecting GitHub.Each repository you add is cloned on every run. Claude starts from the repository’s default branch unless your prompt specifies otherwise. If a GitHub pull request event triggers the run and the pull request’s repository is the task’s first repository, that repository starts from the pull request’s head commit instead.Claude pushes its work to a branch prefixed with claude/ unless your prompt directs it to push to another branch. To control which branches a run can push to, use branch protection rules or rulesets on GitHub. For runs on Anthropic-managed infrastructure, and for self-hosted runs that push through Anthropic’s git proxy, GitHub applies them to the GitHub access you connected, so a rule that access can bypass doesn’t block a run’s push. A self-hosted run that pushes with the git credentials your deployment provides is checked against those instead. See Configure git.
Scheduled tasks can use your connected MCP connectors to read from and write to external services during each run. For example, a task that triages support requests might read from a Slack channel and create issues in Linear.Connectors are the claude.ai integrations on your account. MCP servers you added locally in the CLI with claude mcp add are stored on your machine rather than your claude.ai account, so they do not appear in the connectors list. To use one of those servers in a scheduled task:
In the repository: for a scheduled task with one repository, you can instead declare the server in a committed .mcp.json, unless the task runs as threads in a project. If it does, add the server as a connector.
When you create a scheduled task, all of your currently connected connectors are included by default. Remove any that aren’t needed to limit which tools Claude has access to during the run. You can also add connectors directly from the task’s creation or edit dialog.To manage or add connectors outside of that dialog, visit claude.ai/customize/connectors or use /schedule update in the CLI.
When a run starts a new session on Anthropic’s cloud, that session begins in auto mode unless auto mode is unavailable. In auto mode, a classifier model allows or blocks actions that would otherwise wait for your approval.A run still stops and waits for an answer in cases such as these:
Repeated blocks: one block doesn’t end the run. Once blocks reach auto mode’s repeated-block thresholds, a permission prompt appears in the run’s session and waits until someone answers it
If auto mode is unavailable, such as when your organization turned it off or the task’s model doesn’t support it, the run keeps the permission mode it launched in. To answer a waiting prompt, open the run from the task’s detail page.In a project, a run can continue a thread rather than start a new session. That run keeps whatever permission mode the thread is in at the time. When that thread was made, it started in auto mode unless auto mode was unavailable. To answer a prompt waiting in that thread, see Unblock a thread waiting on approval.
During a run in auto mode, Claude publishes an artifact without asking you once the classifier allows the publish. You’re still asked first when, for example, the publish matches an ask rule. A new artifact is visible only to you until you share it. The Accept edits rules that follow don’t apply in auto mode.When a scheduled task’s job is to keep a page current, give it an artifact you already published.
When a scheduled task’s schedule or Run now starts a run, Claude can publish a new artifact without asking. The new artifact is visible only to you until you share it. If the publish declares runtime capabilities for the page, such as connector calls or file downloads, Claude asks first.In those runs, Claude republishes an existing artifact without asking only when all of these hold:
You can edit the artifact and it belongs to your own organization
If the publish carries more than the page, such as supporting files, you own the artifact
The artifact isn’t shared publicly
If the artifact is shared with specific people or your organization, its viewers don’t automatically see each new version
The publish doesn’t force over a newer version
The publish doesn’t declare runtime capabilities for the page
The existing page holds no grant that reaches beyond the page, such as connector calls
In every other case, including a run that an API or GitHub trigger starts, Claude asks first.
Each scheduled task uses a cloud environment that controls network access, environment variables, and setup scripts. The task inherits the environment’s network policy on every run.The Default environment uses Trusted network access, which allows only the default allowlist through the session’s network. Requests on that path to hosts outside the allowlist fail with 403 and x-deny-reason: host_not_allowed. MCP connector traffic is routed through Anthropic’s servers rather than that path, so the connectors you add to the task work without adding their hosts to Allowed domains. Remove any connectors you don’t need under Connectors.To allow additional domains on one of your own environments, follow these steps. An organization-shared environment opens read-only here, so an Owner changes its network access from the Cloud environments page in admin settings instead.
1
Open the task for editing
Go to claude.ai/code/routines, click the scheduled task, then open the menu next to its name and select Edit. The Edit scheduled task dialog opens.
2
Open the environment selector
Go to Advanced settings > General > Cloud environment, expanding Advanced settings first if it’s collapsed. Click the cloud icon showing your environment’s name, such as Default.
3
Open the environment settings
Hover over the environment in the list and click the settings icon that appears on the right.
4
Change the network access level
In the Edit cloud environment dialog, change Network access to Custom and enter your domains in Allowed domains. Check Also include default list of common package managers to keep the default allowlist alongside your custom domains. Select Full instead for unrestricted access.
5
Save
Click Save changes in the Edit cloud environment dialog, then close the Edit scheduled task dialog behind it. The new policy applies from the next run.
See Network access for details on access levels and the default allowlist.
Scheduled tasks draw down subscription usage the same way interactive sessions do. See your current consumption at claude.ai/settings/usage.Separately from subscription usage, each way of starting a run has an hourly limit:
Action
Limit
Counted for
Over the limit
Scheduled runs, including one-off runs
100 per hour
Your account
The run waits until the limit resets
Run now, API fires, and setting a one-off task to run again
30 per hour
Each scheduled task, one count shared by all three
None of these hourly limits has overage.When a scheduled task hits your subscription usage limit, organizations with usage credits turned on can keep running scheduled tasks on metered overage. Without usage credits, additional runs are rejected until your usage window resets. Turn on usage credits at claude.ai/settings/usage. On Team and Enterprise plans, an admin turns them on for the organization at claude.ai/admin-settings/usage.While your subscription is paused, your scheduled tasks are put on hold and don’t run. Once your subscription is active again, turn them back on.
Scheduled tasks were previously called routines, and these places keep the earlier name. Each one refers to the same feature:
App: in some accounts the sidebar entry and page title read Routines, the button reads New routine, and other labels say routine. To create a task there, see Full-page form.
Web address: claude.ai/code/routines
CLI: the /routines alias for /schedule, the command’s description, and Claude’s replies while it sets up a task
API: the /fire endpoint path, its beta header, its response type, the <routine-fire-payload> tag, and the Trigger a routine through the API reference page
Organization settings: the Scheduled tasks (Was Routines) toggle
The CLI hides /schedule when one of its requirements isn’t met: the command menu shows No commands match "/schedule" while you type. Submitting it returns Unknown command: /schedule, except in the cases below that note a different answer.The cause is usually one of the following:
You are authenticated with a Console API key, an Anthropic profile or federation credential, or a cloud provider such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. /schedule requires a claude.ai subscription login. With a Console API key or a profile, and feature-flag fetching enabled, submitting /schedule instead shows /schedule is available with Claude for Enterprise — ask your admin about migrating from API-key access. With a cloud-provider login, you still see Unknown command: /schedule. If ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN is set in your shell, or apiKeyHelper is set in settings.json, remove it first, since these take precedence over a claude.ai login. A profile or federation credential takes precedence too, so switch that off as well
You are fully signed out, with no API key or other credential. With feature-flag fetching enabled, submitting /schedule shows /schedule requires a claude.ai subscription. Run /login to sign in with your claude.ai account. Before v2.1.268, a signed-out session showed the same Claude for Enterprise message as a Console API key
You are inside a cloud session, where submitting /schedule answers that the command isn’t available in that environment. Manage scheduled tasks from the web UI instead
An Owner turned off scheduled tasks for your Team or Enterprise organization. Before v2.1.227, the command still appeared in this case, and claude.ai rejected the task when Claude tried to create or run it
Your Enterprise organization manages your access with custom roles, and none of your roles includes the scheduled tasks permission under Remote sessions. Ask an Owner to add it to one of your roles
If the cause is your CLI sign-in or being inside a cloud session, you can still create and manage scheduled tasks at claude.ai/code/routines. You need a Pro, Max, Team, or Enterprise account there. If scheduled tasks or cloud sessions are off for your organization or missing from your roles, you can’t create them on the web either.
“Routines are disabled by your organization’s policy”
An Owner in your Team or Enterprise organization has likely turned off the Scheduled tasks (Was Routines) toggle at Organization settings > Capabilities > Remote sessions. On Claude Code v2.1.227 or later, the same toggle also hides /schedule in the CLI. This is a server-side organization setting, so it cannot be overridden from your local configuration. Ask an Owner to turn scheduled tasks back on for your organization.
When a warning under History begins with “The last run”, find it in the first column and do what its row says. The warning clears once a later run starts.
Warning
What to do
”The last run didn’t start because your organization had reached its limit on cloud sessions running at once.”
The task needs no change. Click Run now later, or wait for the next run
”The last run didn’t start because its cloud environment couldn’t be found or used.”
On the task’s detail page, open the menu next to its name, select Edit, and find the cloud environment selector. If it reads Unavailable environment, that environment was archived or is no longer available to your account, so choose another one there and save your changes. Otherwise, retry with Run now on the detail page, or pick another environment in the selector and save your changes
”The last run was blocked because it couldn’t access something it needs, or your organization’s policy doesn’t allow it.”
Check that your GitHub access covers the task’s repositories. If it does, ask an Owner of your Claude organization whether a policy blocks the task
”The last run didn’t start because of a problem that’s usually temporary.”
Click Run now to try again, or wait for the next run
”The last run didn’t start because its repository or branch wasn’t available.”
Check on GitHub that each repository in the task has the branch the run starts from. Also check that your GitHub access covers each repository, and reconnect GitHub if your connection expired
”The last run didn’t start because some of its settings weren’t accepted.”
On the task’s detail page, open the menu next to its name and select Edit. The dialog doesn’t mark which setting wasn’t accepted, so check each one there, including the task’s name, prompt, model, repositories, environment, connectors, and triggers
”The last run stopped because a usage limit was reached.”
For when the task’s runs can start again after a usage limit, see Usage and limits
”The last run failed.”
Click Run now to try again, or wait for the next run. The failed run has no session to open
Desktop scheduled tasks: local scheduled tasks that run on your machine with access to local files
Cloud environments: configure network access, environment variables, and setup scripts for cloud sessions
Projects: ongoing work Claude coordinates across parallel cloud sessions; scheduled tasks created from a project appear on its Scheduled tasks tab
MCP connectors: connect external services like Slack, Linear, and Google Drive
GitHub Actions: run Claude in your CI pipeline on repository events
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Claude Code Docs","description":"Official documentation for Claude Code, Anthropic's agentic coding tool available in the terminal, IDE, desktop app, and browser. Covers installation, configuration, skills, subagents, hooks, MCP, the Agent SDK, and reference material.","colors":{"primary":"#0E0E0E","light":"#D4A27F","dark":"#0E0E0E"},"logo":{"light":"https://mintcdn.com/claude-code/c5r9_6tjPMzFdDDT/logo/light.svg?fit=max\u0026auto=format\u0026n=c5r9_6tjPMzFdDDT\u0026q=85\u0026s=78fd01ff4f4340295a4f66e2ea54903c","dark":"https://mintcdn.com/claude-code/c5r9_6tjPMzFdDDT/logo/dark.svg?fit=max\u0026auto=format\u0026n=c5r9_6tjPMzFdDDT\u0026q=85\u0026s=1298a0c3b3a1da603b190d0de0e31712"},"favicon":"https://mintcdn.com/claude-code/T2WlxklWBkR5Y1mJ/favicon.ico?fit=max\u0026auto=format\u0026n=T2WlxklWBkR5Y1mJ\u0026q=85\u0026s=346a85952ae08d5ee90e3c34d4423930","appearance":{"default":"system"},"background":{"color":{"light":"#FDFDF7","dark":"#09090B"}},"navbar":{"links":[{"href":"https://platform.claude.com/","label":"Claude Developer Platform"}],"primary":{"type":"button","label":"Open Claude Code","href":"https://claude.ai/code"}},"footer":{"socials":{"x":"https://x.com/AnthropicAI","linkedin":"https://www.linkedin.com/company/anthropicresearch"},"links":[{"header":"Company","items":[{"label":"Anthropic","href":"https://www.anthropic.com/company"},{"label":"Careers","href":"https://www.anthropic.com/careers"},{"label":"Economic Futures","href":"https://www.anthropic.com/economic-futures"},{"label":"Research","href":"https://www.anthropic.com/research"},{"label":"News","href":"https://www.anthropic.com/news"},{"label":"Trust center","href":"https://trust.anthropic.com/"},{"label":"Transparency","href":"https://www.anthropic.com/transparency"}]},{"header":"Help and security","items":[{"label":"Availability","href":"https://www.anthropic.com/supported-countries"},{"label":"Status","href":"https://status.anthropic.com/"},{"label":"Support center","href":"https://support.claude.com/"}]},{"header":"Learn","items":[{"label":"Courses","href":"https://academy.claude.com/"},{"label":"MCP connectors","href":"https://claude.com/partners/mcp"},{"label":"Customer stories","href":"https://www.claude.com/customers"},{"label":"Engineering blog","href":"https://www.anthropic.com/engineering"},{"label":"Events","href":"https://www.anthropic.com/events"},{"label":"Powered by Claude","href":"https://claude.com/partners/powered-by-claude"},{"label":"Service partners","href":"https://claude.com/partners/services"},{"label":"Startups program","href":"https://claude.com/programs/startups"}]},{"header":"Terms and policies","items":[{"label":"Privacy choices","href":"https://www.anthropic.com/legal/privacy"},{"label":"Privacy policy","href":"https://www.anthropic.com/legal/privacy"},{"label":"Disclosure policy","href":"https://www.anthropic.com/responsible-disclosure-policy"},{"label":"Usage policy","href":"https://www.anthropic.com/legal/aup"},{"label":"Commercial terms","href":"https://www.anthropic.com/legal/commercial-terms"},{"label":"Consumer terms","href":"https://www.anthropic.com/legal/consumer-terms"}]}]},"seo":{"metatags":{"canonical":"https://code.claude.com/docs"}},"fonts":{"family":"Anthropic Sans"},"contextual":{"options":["copy","view","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":"en/overview"},{"language":"fr","href":"fr/overview"},{"language":"de","href":"de/overview"},{"language":"it","href":"it/overview"},{"language":"jp","href":"ja/overview"},{"language":"es","href":"es/overview"},{"language":"ko","href":"ko/overview"},{"language":"zh-CN","href":"zh-CN/overview"},{"language":"zh-TW","href":"zh-TW/overview"},{"language":"ru","href":"ru/overview"},{"language":"id","href":"id/overview"},{"language":"pt-BR","href":"pt/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"claude-code","hasAudioNarration":false,"actualSubdomain":"claude-code","customDomains":["code.claude.com"],"gitSource":{"type":"github","owner":"anthropics","repo":"claude-code-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae2b86371d312d7bc331906","collectionId":"4b990430-3fd8-4677-967a-ffd06b9715a3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae2b86371d312d7bc331906"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED","enabled":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED","enabled":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae2bbc4080c7b2bae7c190f","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"en","tag":"Agent SDK","count":60},{"language":"en","tag":"Plugins","count":56},{"language":"de","tag":"Neuigkeiten","count":50},{"language":"en","tag":"What's New","count":50},{"language":"es","tag":"Novedades","count":50},{"language":"fr","tag":"Nouveautés","count":50},{"language":"it","tag":"Novità","count":50},{"language":"ko","tag":"새로운 기능","count":50},{"language":"pt-BR","tag":"Novidades","count":50},{"language":"ru","tag":"Что нового","count":50},{"language":"zh-TW","tag":"最新消息","count":50},{"language":"de","tag":"Erste Schritte","count":49},{"language":"es","tag":"Primeros pasos","count":49},{"language":"fr","tag":"Premiers pas","count":49},{"language":"id","tag":"Memulai","count":49},{"language":"it","tag":"Per iniziare","count":49},{"language":"jp","tag":"はじめに","count":49},{"language":"ko","tag":"시작하기","count":49},{"language":"pt-BR","tag":"Primeiros passos","count":49},{"language":"ru","tag":"Начало работы","count":49},{"language":"zh-TW","tag":"快速入門","count":49},{"language":"en","tag":"Getting started","count":48},{"language":"zh-CN","tag":"快速入门","count":46},{"language":"en","tag":"Overview","count":41},{"language":"de","tag":"Agent SDK","count":36},{"language":"en","tag":"Setup and access","count":36},{"language":"es","tag":"Agent SDK","count":36},{"language":"id","tag":"Agent SDK","count":36},{"language":"it","tag":"Agent SDK","count":36},{"language":"jp","tag":"Agent SDK","count":36},{"language":"pt-BR","tag":"Agent SDK","count":36},{"language":"ru","tag":"Agent SDK","count":36},{"language":"zh-CN","tag":"Agent SDK","count":36},{"language":"zh-TW","tag":"Agent SDK","count":36},{"language":"de","tag":"Administration","count":34},{"language":"en","tag":"Administration","count":34},{"language":"es","tag":"Administración","count":34},{"language":"fr","tag":"Administration","count":34},{"language":"id","tag":"Administrasi","count":34},{"language":"it","tag":"Amministrazione","count":34},{"language":"jp","tag":"管理","count":34},{"language":"ko","tag":"관리","count":34},{"language":"pt-BR","tag":"Administração","count":34},{"language":"ru","tag":"Администрирование","count":34},{"language":"zh-CN","tag":"管理","count":34},{"language":"zh-TW","tag":"管理","count":34},{"language":"de","tag":"Plugins","count":32},{"language":"es","tag":"Plugins","count":32},{"language":"fr","tag":"SDK Agent","count":32},{"language":"fr","tag":"Plugins","count":32},{"language":"id","tag":"Plugin","count":32},{"language":"it","tag":"Plugin","count":32},{"language":"jp","tag":"プラグイン","count":32},{"language":"ko","tag":"Agent SDK","count":32},{"language":"ko","tag":"플러그인","count":32},{"language":"pt-BR","tag":"Plugins","count":32},{"language":"ru","tag":"Плагины","count":32},{"language":"zh-CN","tag":"插件","count":32},{"language":"zh-TW","tag":"外掛","count":32},{"language":"en","tag":"Reference","count":28},{"language":"es","tag":"Configuración","count":28},{"language":"jp","tag":"設定","count":28},{"language":"zh-TW","tag":"設定","count":28},{"language":"de","tag":"Konfiguration","count":25},{"language":"en","tag":"Configuration","count":25},{"language":"fr","tag":"Configuration","count":25},{"language":"id","tag":"Konfigurasi","count":25},{"language":"id","tag":"Apa yang Baru","count":25},{"language":"id","tag":"Yang Baru","count":25},{"language":"it","tag":"Configurazione","count":25},{"language":"jp","tag":"新機能","count":25},{"language":"jp","tag":"最新情報","count":25},{"language":"ko","tag":"구성","count":25},{"language":"pt-BR","tag":"Configuração","count":25},{"language":"ru","tag":"Конфигурация","count":25},{"language":"zh-CN","tag":"配置","count":25},{"language":"zh-CN","tag":"新功能","count":25},{"language":"zh-CN","tag":"最新动态","count":25},{"language":"en","tag":"Settings","count":24},{"language":"de","tag":"Mit Claude Code entwickeln","count":22},{"language":"es","tag":"Crea con Claude Code","count":22},{"language":"fr","tag":"Développer avec Claude Code","count":22},{"language":"id","tag":"Membangun dengan Claude Code","count":22},{"language":"it","tag":"Crea con Claude Code","count":22},{"language":"jp","tag":"Claude Code で構築","count":22},{"language":"ko","tag":"Claude Code로 만들기","count":22},{"language":"pt-BR","tag":"Desenvolva com Claude Code","count":22},{"language":"ru","tag":"Разработка с Claude Code","count":22},{"language":"zh-CN","tag":"使用 Claude Code 构建","count":22},{"language":"zh-TW","tag":"使用 Claude Code 打造","count":22},{"language":"de","tag":"Referenz","count":20},{"language":"es","tag":"Referencia","count":20},{"language":"fr","tag":"Référence","count":20},{"language":"id","tag":"Referensi","count":20},{"language":"it","tag":"Riferimento","count":20},{"language":"jp","tag":"リファレンス","count":20},{"language":"ko","tag":"레퍼런스","count":20},{"language":"pt-BR","tag":"Referência","count":20},{"language":"ru","tag":"Справочник","count":20},{"language":"zh-CN","tag":"参考","count":20},{"language":"de","tag":"Plattformen und Integrationen","count":19},{"language":"es","tag":"Plataformas e integraciones","count":19},{"language":"fr","tag":"Plateformes et intégrations","count":19},{"language":"id","tag":"Platform dan integrasi","count":19},{"language":"it","tag":"Piattaforme e integrazioni","count":19},{"language":"jp","tag":"プラットフォームと連携","count":19},{"language":"ko","tag":"플랫폼 및 통합","count":19},{"language":"pt-BR","tag":"Plataformas e integrações","count":19},{"language":"ru","tag":"Платформы и интеграции","count":19},{"language":"zh-CN","tag":"平台与集成","count":19},{"language":"zh-TW","tag":"平台與整合","count":19},{"language":"de","tag":"Code-Review und Pull Requests","count":14},{"language":"es","tag":"Revisión de código y pull requests","count":14},{"language":"fr","tag":"Revue de code et pull requests","count":14},{"language":"it","tag":"Code review e pull request","count":14},{"language":"ko","tag":"코드 리뷰 및 풀 리퀘스트","count":14},{"language":"pt-BR","tag":"Revisão de código e pull requests","count":14},{"language":"ru","tag":"Код-ревью и pull request","count":14},{"language":"zh-TW","tag":"程式碼審查與 pull request","count":14},{"language":"zh-TW","tag":"部署","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-bash","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"chat-bucketing-batched","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"button.css","content":".btn{position:relative;display:inline-flex;gap:.5rem;align-items:center;justify-content:center;flex-shrink:0;min-width:5rem;height:2.25rem;padding:.5rem 1rem;white-space:nowrap;font-family:Styrene;font-weight:600;border-radius:.5rem}"},{"filePath":"style.css","content":"@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-Regular-Static.otf) format(\"opentype\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-RegularItalic-Static.otf) format(\"opentype\");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-Medium-Static.otf) format(\"opentype\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-MediumItalic-Static.otf) format(\"opentype\");font-weight:500;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-Semibold-Static.otf) format(\"opentype\");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-SemiboldItalic-Static.otf) format(\"opentype\");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-Bold-Static.otf) format(\"opentype\");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Sans\";src:url(https://assets.claude.ai/Fonts/AnthropicSans-Text-BoldItalic-Static.otf) format(\"opentype\");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Serif Display\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Display-Regular-Static.otf) format(\"opentype\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif Display\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Display-RegularItalic-Static.otf) format(\"opentype\");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Serif Display\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Display-Medium-Static.otf) format(\"opentype\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif Display\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Display-Semibold-Static.otf) format(\"opentype\");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif Display\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Display-Bold-Static.otf) format(\"opentype\");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-Regular-Static.otf) format(\"opentype\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-RegularItalic-Static.otf) format(\"opentype\");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-Medium-Static.otf) format(\"opentype\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-MediumItalic-Static.otf) format(\"opentype\");font-weight:500;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-Semibold-Static.otf) format(\"opentype\");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-SemiboldItalic-Static.otf) format(\"opentype\");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-Bold-Static.otf) format(\"opentype\");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:\"Anthropic Serif\";src:url(https://assets.claude.ai/Fonts/AnthropicSerif-Text-BoldItalic-Static.otf) format(\"opentype\");font-weight:700;font-style:italic;font-display:swap}:root{--always-white:0 0% 100%;--always-black:0 0% 0%;--constant-book-cloth:15 55% 80%;--constant-clay:15 60% 85%;--constant-kraft:25 40% 83%;--constant-manilla:40 20% 92%;--constant-slate-000:0 0% 100%;--constant-slate-050:48 33.3% 97.1%;--constant-slate-100:53 28.6% 94.5%;--constant-slate-150:48 25% 92.2%;--constant-slate-200:50 20.7% 88.6%;--constant-slate-250:51 16.5% 84.5%;--constant-slate-300:50 11.5% 79.6%;--constant-slate-350:50 9% 73.7%;--constant-slate-400:49 6.5% 66.9%;--constant-slate-450:48 4.8% 59.2%;--constant-slate-500:53 3.2% 51.4%;--constant-slate-550:51 3.1% 43.7%;--constant-slate-600:48 2.7% 35.9%;--constant-slate-650:48 3.4% 29.2%;--constant-slate-700:60 2.5% 23.3%;--constant-slate-750:60 2.1% 18.4%;--constant-slate-800:60 2.7% 14.5%;--constant-slate-850:30 3.3% 11.8%;--constant-slate-900:30 4% 9.8%;--constant-slate-950:60 2.6% 7.6%;--constant-slate-1000:60 3.4% 5.7%}:root:not(.dark){--accent-brand:15 63.1% 59.6%;--accent-main-000:15 55.6% 52.4%;--accent-main-100:15 55.6% 52.4%;--accent-main-200:15 63.1% 59.6%;--accent-main-900:0 0% 0%;--accent-pro-000:251 34.2% 33.3%;--accent-pro-100:251 40% 45.1%;--accent-pro-200:251 61% 72.2%;--accent-pro-900:253 33.3% 91.8%;--accent-secondary-000:210 73.7% 40.2%;--accent-secondary-100:210 70.9% 51.6%;--accent-secondary-200:210 70.9% 51.6%;--accent-secondary-900:211 72% 90%;--bg-000:0 0% 100%;--bg-100:48 33.3% 97.1%;--bg-200:53 28.6% 94.5%;--bg-300:48 25% 92.2%;--bg-400:50 20.7% 88.6%;--bg-500:50 20.7% 88.6%;--border-100:30 3.3% 11.8%;--border-200:30 3.3% 11.8%;--border-300:30 3.3% 11.8%;--border-400:30 3.3% 11.8%;--danger-000:0 61.4% 22.4%;--danger-100:0 58.6% 34.1%;--danger-200:0 58.6% 34.1%;--danger-900:0 50% 95%;--oncolor-100:0 0% 100%;--oncolor-200:60 6.7% 97.1%;--oncolor-300:60 6.7% 97.1%;--text-000:60 2.6% 7.6%;--text-100:60 2.6% 7.6%;--text-200:60 2.5% 23.3%;--text-300:60 2.5% 23.3%;--text-400:51 3.1% 43.7%;--text-500:51 3.1% 43.7%}:root.dark{--accent-brand:15 63.1% 59.6%;--accent-main-000:15 55.6% 52.4%;--accent-main-100:15 63.1% 59.6%;--accent-main-200:15 63.1% 59.6%;--accent-main-900:0 0% 0%;--accent-pro-000:251 84.6% 74.5%;--accent-pro-100:251 40.2% 54.1%;--accent-pro-200:251 40% 45.1%;--accent-pro-900:250 25.3% 19.4%;--accent-secondary-000:210 71.1% 62%;--accent-secondary-100:210 70.9% 51.6%;--accent-secondary-200:210 70.9% 51.6%;--accent-secondary-900:210 55.9% 24.6%;--bg-000:60 2.1% 18.4%;--bg-100:60 2.7% 14.5%;--bg-200:30 3.3% 11.8%;--bg-300:60 2.6% 7.6%;--bg-400:60 3.4% 5.7%;--bg-500:60 3.4% 5.7%;--border-100:51 16.5% 84.5%;--border-200:51 16.5% 84.5%;--border-300:51 16.5% 84.5%;--border-400:51 16.5% 84.5%;--danger-000:0 73.1% 66.5%;--danger-100:0 58.6% 34.1%;--danger-200:0 58.6% 34.1%;--danger-900:0 23% 15.6%;--oncolor-100:0 0% 100%;--oncolor-200:60 6.7% 97.1%;--oncolor-300:60 6.7% 97.1%;--text-000:48 33.3% 97.1%;--text-100:48 33.3% 97.1%;--text-200:50 9% 73.7%;--text-300:50 9% 73.7%;--text-400:48 4.8% 59.2%;--text-500:48 4.8% 59.2%}#home-header{font-family:\"Anthropic Sans\",system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;font-weight:400!important;font-size:50px;line-height:1.2;margin-bottom:1rem;color:--text-000;display:flex;align-items:baseline;justify-content:center;flex-wrap:nowrap}#localization-select-trigger>:has(img[src*=flags]),div[id^=localization-select-item]>:has(img[src*=flags]){display:none}@media (min-width:768px){#home-header{justify-content:center}}.build-with{font-family:\"Anthropic Sans\",system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;letter-spacing:-.02em}.claude-wordmark-wrapper{display:inline-flex;align-items:baseline;margin-left:10px}.claude-wordmark{height:40px;width:auto;position:relative}.dark #home-header,.dark .description-text{color:#fff}.description-text{color:#000}.dark .claude-wordmark{filter:invert(1)}:root{--bg-color:#f0efea}.dark{--bg-color:#2b2b2b}#category-select,#content-container,#table-of-contents,.dropdown-item,.eyebrow,body,input{font-family:\"Anthropic Sans\",system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif}.eyebrow{text-transform:uppercase;letter-spacing:.02rem}#content-container h1,#content-container h2,#content-container h3,#content-container h4,#content-container h5,#content-container h6{font-family:\"Anthropic Serif Display\",Georgia,\"Times New Roman\",Times,serif;font-weight:400;letter-spacing:0;word-spacing:.1em}#content-container p{font-size:1rem;line-height:1.65rem}.font-extrabold{font-weight:600!important}.wide-table{width:100%;overflow-x:auto}.wide-table table{width:175%;margin-bottom:0}#prompt-library-container{margin:4rem auto;max-width:48rem;padding-left:1.25rem;padding-right:1.25rem}.prompt-library-title{font-size:24px;text-align:center;font-weight:700;color:#1f2937}.dark .prompt-library-title{color:#e5e7eb}.prompt-library-description{margin-top:1rem;text-align:center}.main-content{margin-bottom:10rem;max-width:64rem;margin-left:auto;margin-right:auto;padding-left:1.25rem;padding-right:1.25rem}.prompt-controllers{display:flex;gap:.5rem}.prompt-search-container{position:relative;flex:1 1 0%}.prompt-search-icon-container{display:flex;position:absolute;top:0;bottom:0;left:0;align-items:center;padding-left:.75rem}.prompt-search-icon{margin-left:.25rem;margin-right:.75rem;flex:none;width:1rem;height:1rem;background-color:#6b7280;mask-image:url(https://mintlify.b-cdn.net/v6.5.1/solid/magnifying-glass.svg);mask-repeat:no-repeat;mask-position:center center}input.prompt-search-bar{display:block;height:2.5rem;padding-left:2.5rem;border-radius:.75rem;border-width:1px;background-color:#fff;width:100%;color:#111827;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.dark input.prompt-search-bar{color:#fff;background-color:rgb(var(--background-dark));border-color:#d1d5db1a}input.prompt-search-bar:focus{outline-color:rgb(var(--primary))}.dark input.prompt-search-bar:focus{outline-color:rgb(var(--primary-light))}.dark .dropdown-icon,.dark .prompt-search-icon{background-color:#ffffff80}#category-select{padding-left:1rem;padding-right:2.5rem;height:2.5rem;display:flex;align-items:center;border-radius:.75rem;border-width:1px;color:#111827;background-color:#fff;cursor:pointer;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);white-space:nowrap}.dark #category-select{background-color:rgb(var(--background-dark));border-color:#d1d5db1a;color:#fff}#category-select:hover,.dropdown-item:hover{background-color:#f9fafb}.dark #category-select:hover,.dark .dropdown-item:hover{background-color:#ffffff0d}#category-select:focus{outline-color:rgb(var(--primary))}.dark #category-select:focus{outline-color:rgb(var(--primary-light))}#categories-dropdown{top:calc(100% + 4px);padding:.5rem;display:none;position:absolute;z-index:10;border-radius:.75rem;border-width:1px;width:100%;color:#111827;background-color:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.dark #categories-dropdown{background-color:rgb(var(--background-dark));border-color:#d1d5db1a;color:#fff}#categories-dropdown-clickout{position:fixed;top:0;right:0;bottom:0;left:0;z-index:0}.dropdown-icon-container{display:flex;position:absolute;top:0;bottom:0;right:0;align-items:center;padding-right:.25rem}.dropdown-icon{margin-left:.25rem;margin-right:.75rem;flex:none;width:.75rem;height:.75rem;background-color:#6b7280;mask-image:url(https://mintlify.b-cdn.net/v6.5.1/solid/caret-down.svg);mask-repeat:no-repeat;mask-position:center center}#prompts-container{grid-template-columns:repeat(1,minmax(0,1fr));gap:2rem;display:grid;margin-top:2.5rem}.dropdown-item{padding:.25rem .5rem;border-radius:.375rem;display:flex;align-items:center;cursor:pointer}.check-icon{mask-image:url(https://mintlify.b-cdn.net/v6.5.1/solid/check.svg);height:.875rem;width:1rem;background-color:rgb(var(--primary-light));mask-repeat:no-repeat;mask-position:center center}.prompt-card{margin:-.75rem;padding:.75rem;display:flex;border-radius:1rem}.prompt-card:hover{background-color:#03071208}.dark .prompt-card:hover{background-color:#ffffff08}.prompt-icon-container{display:flex;flex:none;align-items:center;justify-content:center;margin-right:1.5rem;border-radius:.75rem;height:4rem;width:4rem;background-color:#cb785c1a}.prompt-icon{height:1.5rem;width:1.5rem;background-color:rgb(var(--primary-light));mask-repeat:no-repeat;mask-position:center center}.prompt-title{color:rgb(31 41 55);font-weight:600}.dark .prompt-title{color:rgb(229 231 235)}.prompt-description{margin-top:.25rem}@media (min-width:640px){#category-select{width:16rem}}@media (min-width:1024px){#prompts-container{grid-template-columns:repeat(2,minmax(0,1fr))}}.home-cards-custom{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,auto);gap:1.5rem}.home-cards-custom .card{background:0 0;border:.5px solid hsl(var(--border-300));border-radius:12px;padding:.25rem}@media (max-width:1024px){.home-cards-custom{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(3,auto)}}@media (max-width:768px){.home-cards-custom{grid-template-columns:1fr;grid-template-rows:repeat(6,auto)}}.relative{position:relative}.flex-1{flex:1 1 0%}.mermaid{position:relative;background-color:#fdfdfb;background-image:linear-gradient(rgba(235,219,188,.25) 1px,transparent 1px),linear-gradient(90deg,rgba(235,219,188,.25) 1px,transparent 1px),linear-gradient(rgba(235,219,188,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(235,219,188,.1) 1px,transparent 1px);background-size:20px 20px,20px 20px,4px 4px,4px 4px;background-position:-1px -1px,-1px -1px,-1px -1px,-1px -1px;padding:20px;border-radius:8px;border:1px solid rgba(235,219,188,.4);box-shadow:0 2px 4px rgba(64,64,62,.08)}.dark .mermaid{background-color:#1a1918;background-image:linear-gradient(rgba(212,162,127,.15) 1px,transparent 1px),linear-gradient(90deg,rgba(212,162,127,.15) 1px,transparent 1px),linear-gradient(rgba(212,162,127,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(212,162,127,.08) 1px,transparent 1px);border:1px solid rgba(102,102,99,.5);box-shadow:0 2px 4px rgba(0,0,0,.2)}.digest-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem 1rem;padding:.75rem 1rem;margin:1.5rem 0 2.5rem;border:1px solid hsl(var(--border-300)/.15);background:hsl(var(--bg-200));font-variant-numeric:tabular-nums;font-size:.875rem;color:hsl(var(--text-400))}#content-container .digest-meta a{color:hsl(var(--accent-main-100));font-weight:500;text-decoration:none;border-bottom:none}#content-container .digest-meta a:hover{text-decoration:underline}.digest-feature{position:relative;margin:2.5rem 0;padding:1.875rem 1.875rem 1.625rem;background:radial-gradient(circle,hsl(var(--text-000)/.025) 1px,transparent 1px) 0 0/18px 18px,linear-gradient(180deg,hsl(var(--constant-manilla)/.55),hsl(var(--constant-manilla)/.38));border:1px solid hsl(var(--border-300)/.12);box-shadow:inset 0 1px 0 hsl(var(--text-000)/.04),0 1px 2px hsl(var(--always-black)/.04)}.digest-feature::before{content:\"\";position:absolute;inset:0 auto 0 0;width:4px;background:hsl(var(--accent-brand))}.dark .digest-feature{background:radial-gradient(circle,hsl(var(--text-000)/.02) 1px,transparent 1px) 0 0/18px 18px,linear-gradient(180deg,hsl(var(--bg-000)/.75),hsl(var(--bg-000)/.5));border-color:hsl(var(--border-300)/.1);box-shadow:inset 0 1px 0 hsl(var(--text-000)/.03),0 1px 2px hsl(var(--always-black)/.25)}.digest-feature>:first-child{margin-top:0}.digest-feature>:last-child{margin-bottom:0}.digest-feature-header{display:flex;align-items:center;flex-wrap:wrap;gap:.625rem;margin:0 0 .75rem}#content-container .digest-feature-title{font-family:\"Anthropic Serif Display\",Georgia,serif;font-size:1.75rem;line-height:1.15;font-weight:500;letter-spacing:-.015em;color:hsl(var(--text-000));margin:0}#content-container .digest-feature-pill{font-family:ui-monospace,\"SF Mono\",Menlo,Consolas,monospace;font-size:.75rem;line-height:1;letter-spacing:.01em;padding:.3rem .6rem;border-radius:999px;background:hsl(var(--accent-brand)/.12);color:hsl(var(--accent-main-000));border:1px solid hsl(var(--accent-brand)/.25);white-space:nowrap;transform:translateY(1px)}#content-container .digest-feature-lede{font-size:1.0625rem;line-height:1.65;color:hsl(var(--text-100));margin:0 0 1.25rem;max-width:none}#content-container .digest-feature-lede code{font-size:.875em;padding:.1em .35em}#content-container .digest-feature-try{font-size:.875rem;color:hsl(var(--text-400));margin:1.25rem 0 .5rem}#content-container .digest-feature .frame{margin:1rem 0;border-radius:0;padding:0}#content-container .digest-feature .frame>*,#content-container .digest-feature [class*=CodeBlock],#content-container .digest-feature pre{border-radius:0}#content-container .digest-feature-link{display:inline-flex;align-items:center;gap:.35rem;font-size:.875rem;font-weight:500;color:hsl(var(--accent-main-100));text-decoration:none;border-bottom:none;margin-top:.75rem}#content-container .digest-feature-link::after{content:\"→\";transition:transform 120ms ease-out}#content-container .digest-feature-link:hover::after{transform:translateX(3px)}.digest-wins{margin:2.5rem 0;padding:1.5rem 1.75rem 1.25rem;background:hsl(var(--bg-200));border:1px solid hsl(var(--border-300)/.1)}.dark .digest-wins{background:hsl(var(--bg-200)/.6)}#content-container .digest-wins-title{font-family:\"Anthropic Serif Display\",Georgia,serif;font-size:1.25rem;font-weight:500;color:hsl(var(--text-000));margin:0 0 .75rem}.digest-wins-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));column-gap:2rem}#content-container .digest-wins-grid>div{position:relative;font-size:.875rem;line-height:1.5;color:hsl(var(--text-300));padding:.5rem 0 .5rem 1.125rem;border-top:1px solid hsl(var(--border-300)/.06);margin:0}#content-container .digest-wins-grid>div::before{content:\"+\";position:absolute;left:0;top:.5rem;font-family:ui-monospace,\"SF Mono\",Menlo,Consolas,monospace;font-size:.8125rem;font-weight:600;color:hsl(var(--accent-brand))}#content-container .digest-wins-grid>div:first-child,#content-container .digest-wins-grid>div:nth-child(2){border-top:none;padding-top:0}#content-container .digest-wins-grid>div:first-child::before,#content-container .digest-wins-grid>div:nth-child(2)::before{top:0}#content-container .digest-wins-grid code{font-size:.8125rem;padding:.1em .3em}:root{--toc-wrapper-max:92rem;--toc-wrapper-pad:2rem;--toc-col:19rem;--toc-side:28rem;--toc-btn-size:1.75rem}#toc-collapse-toggle{display:none;align-items:center;justify-content:center;position:fixed;top:10rem;right:calc(max((100% - var(--toc-wrapper-max))/2,0px) + var(--toc-wrapper-pad) + var(--toc-col) - var(--toc-btn-size) - .35rem);transition:right 200ms ease-out;z-index:30;width:var(--toc-btn-size);height:var(--toc-btn-size);border-radius:9999px;border:1px solid hsl(var(--border-300)/.15);background:hsl(var(--bg-100));color:hsl(var(--text-400));cursor:pointer}#toc-collapse-toggle:hover{background:hsl(var(--bg-300));color:hsl(var(--text-100))}#toc-collapse-toggle svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}#toc-collapse-toggle .toc-glyph{display:none;stroke-width:2}@media print{#toc-collapse-toggle{display:none!important}}@media (prefers-reduced-motion:reduce){#toc-collapse-toggle{transition:none}}@media (min-width:1280px){html:has(#table-of-contents-layout) #toc-collapse-toggle{display:flex}html.toc-collapsed #toc-collapse-toggle .toc-chevron{transform:rotate(180deg)}html.toc-collapsed #toc-collapse-toggle{right:.5rem;width:auto;padding:0 .5rem;gap:.25rem}html.toc-collapsed #toc-collapse-toggle .toc-glyph{display:block}html.toc-collapsed #table-of-contents-layout{display:none!important}html.toc-collapsed #content-side-layout:has(#table-of-contents-layout){display:none!important}html.toc-collapsed #content-container:has(#table-of-contents-layout) #content-area{width:100%!important}html.toc-collapsed #content-container:has(#table-of-contents-layout) #content-area>*{max-width:calc(var(--toc-wrapper-max) - var(--toc-side))}}@media (max-width:640px){.digest-feature{margin:1.5rem 0}#content-container .digest-feature-title{font-size:1.375rem}.digest-feature,.digest-wins{padding:1.25rem 1rem 1rem}.digest-wins-grid{grid-template-columns:1fr}#content-container .digest-wins-grid>div:nth-child(2){border-top:1px solid hsl(var(--border-300)/.06);padding-top:.5rem}#content-container .digest-wins-grid>div:nth-child(2)::before{top:.5rem}}[role=menu]:has(>.nav-dropdown-item){width:340px;max-width:calc(100vw - 32px);max-height:min(680px,calc(100vh - 130px));padding:8px;border-radius:16px}[role=menu]:has(>.nav-dropdown-item:nth-child(5)){width:640px;display:grid;grid-template-columns:1fr 1fr;column-gap:8px;align-content:start}.nav-dropdown-item{padding:9px 12px}.nav-dropdown-item span.text-sm{font-size:14.5px;font-weight:600;color:#141413}.nav-dropdown-item span.text-xs{font-size:13.5px;line-height:1.4;color:#73726c}.dark .nav-dropdown-item span.text-sm{color:#faf9f5}.dark .nav-dropdown-item span.text-xs{color:#97958c}@media (max-width:700px){[role=menu]:has(>.nav-dropdown-item:nth-child(5)){width:340px;display:block}}.nav-tabs .nav-tabs-item:focus-visible{outline:2px solid currentColor;outline-offset:-4px;border-radius:8px}#navigation-items button[aria-haspopup=menu]:not(#localization-select-trigger)~button[aria-haspopup=menu]{display:none}[data-base-ui-portal]:has(.nav-dropdown-item):has(~[data-base-ui-portal] .nav-dropdown-item){visibility:hidden;pointer-events:none}"}],"page":{"pagePath":"en/routines","slug":"/en/routines","pageMetadata":{"title":"Automate work with scheduled tasks","sidebarTitle":"Cloud scheduled tasks","description":"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.","keywords":["/schedule","schedule","scheduled task","routine","routines","/routines","cloud cron","remote schedule","trigger"],"href":"/en/routines"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Step,Steps,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsx(_components.p,{children:`Scheduled tasks are in research preview. Behavior, limits, and the API surface may change.`})}),`\n`,_jsxs(_components.p,{children:[`A cloud scheduled task, formerly a routine, is a saved Claude Code configuration: a prompt, one or more repositories, and a set of `,_jsx(_components.a,{href:`/en/mcp`,children:`connectors`}),`, packaged once and run automatically. Scheduled tasks execute on Anthropic-managed cloud infrastructure, or on your organization’s `,_jsx(_components.a,{href:`/en/self-hosted-environments`,children:`self-hosted environment`}),` when routed there, so they keep working when your laptop is closed.`]}),`\n`,_jsx(_components.p,{children:`Each scheduled task can have one or more triggers attached to it:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Schedule`}),`: run on a recurring cadence like hourly, nightly, or weekly, or once at a specific future time`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API`}),`: trigger on demand by sending an HTTP POST to the task’s own endpoint with a bearer token`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`GitHub`}),`: run automatically in response to repository events such as pull requests or releases`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`A single scheduled task can combine triggers. For example, a PR review task can run nightly, trigger from a deploy script, and also react to every new PR.`}),`\n`,_jsx(_components.p,{children:`A scheduled task doesn’t need a schedule:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A task with only an API trigger runs when you call its endpoint.`}),`\n`,_jsx(_components.li,{children:`A task with only a GitHub trigger runs when a matching repository event occurs.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Scheduled tasks are available on Pro, Max, Team, and Enterprise plans. Create and manage them at `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),`, or from the CLI with `,_jsx(_components.code,{children:`/schedule`}),`. The earlier name, routines, `,_jsx(_components.a,{href:`#where-the-name-routines-still-appears`,children:`still appears`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Two other features schedule work on your machine instead of in the cloud: `,_jsx(_components.a,{href:`/en/desktop-scheduled-tasks`,children:`Desktop scheduled tasks`}),` and `,_jsx(_components.a,{href:`/en/scheduled-tasks`,children:_jsx(_components.code,{children:`/loop`})}),`. To choose among all three, see `,_jsx(_components.a,{href:`/en/scheduled-tasks#compare-scheduling-options`,children:`Compare scheduling options`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Team and Enterprise Owners can turn off scheduled tasks for all members with the `,_jsx(_components.strong,{children:`Scheduled tasks (Was Routines)`}),` toggle at `,_jsx(_components.a,{href:`https://claude.ai/admin-settings/capabilities`,children:_jsx(_components.strong,{children:`Organization settings > Capabilities > Remote sessions`})}),`. When the toggle is off, existing scheduled tasks stop running and members can’t create new ones.`]}),`\n`,_jsxs(_components.p,{children:[`If your Enterprise organization manages your access with `,_jsx(_components.a,{href:`https://support.claude.com/en/articles/13930452`,children:`custom roles`}),`, you also need a role that includes the scheduled tasks permission. An Owner can add it in a role’s `,_jsx(_components.strong,{children:`Remote sessions`}),` section at `,_jsx(_components.a,{href:`https://claude.ai/admin-settings/roles`,children:_jsx(_components.strong,{children:`Organization settings > Roles`})}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-use-cases`,children:`Example use cases`}),`\n`,_jsx(_components.p,{children:`Each example pairs a trigger type with the kind of work scheduled tasks are suited to: unattended, repeatable, and tied to a clear outcome.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Backlog maintenance`}),`: a schedule trigger runs every weeknight in your repository, with your issue tracker added as a connector. The scheduled task reads issues opened since the last run, applies labels, and assigns owners based on the area of code referenced. It then posts a summary to Slack so the team starts the day with a groomed queue.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Alert triage`}),`: your monitoring tool calls the scheduled task’s API endpoint when an error threshold is crossed, passing the alert body as `,_jsx(_components.code,{children:`text`}),`. The task’s prompt tells Claude to investigate the alert in the fire payload, so it pulls the stack trace and correlates it with recent commits in the repository. It then opens a draft pull request with a proposed fix and a link back to the alert. On-call reviews the PR instead of starting from a blank terminal.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Bespoke code review`}),`: a GitHub trigger runs on `,_jsx(_components.code,{children:`pull_request.opened`}),`. The scheduled task applies your team’s own review checklist and leaves inline comments for security, performance, and style issues. It also adds a summary comment so human reviewers can focus on design instead of mechanical checks.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Deploy verification`}),`: your CD pipeline calls the scheduled task’s API endpoint after each production deploy. The task runs smoke checks against the new build, scans error logs for regressions, and posts a go or no-go to the release channel before the deploy window closes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Docs drift`}),`: a schedule trigger runs weekly. The scheduled task scans merged PRs since the last run, flags documentation that references changed APIs, and opens update PRs against the docs repository for an editor to review.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Library port`}),`: a GitHub trigger runs on `,_jsx(_components.code,{children:`pull_request.closed`}),` filtered to merged PRs in one SDK repository. The scheduled task ports the change to a parallel SDK in another language and opens a matching PR, keeping the two libraries in step without a human re-implementing each change.`]}),`\n`]}),`\n`,_jsx(`span`,{id:`create-a-routine`}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-scheduled-task`,children:`Create a scheduled task`}),`\n`,_jsxs(_components.p,{children:[`Create a scheduled task from the web at `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),`, from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a scheduled task you create in one shows up in the others immediately. In the Desktop app’s `,_jsx(_components.strong,{children:`Code`}),` tab, click `,_jsx(_components.strong,{children:`Scheduled`}),` in the sidebar or in the sidebar’s `,_jsx(_components.strong,{children:`More`}),` menu, then `,_jsx(_components.strong,{children:`New task`}),`, and continue with `,_jsx(_components.a,{href:`#create-from-the-web`,children:`Create from the web`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Scheduled tasks run autonomously as full Claude Code cloud sessions. The session runs shell commands, uses `,_jsx(_components.a,{href:`/en/skills`,children:`skills`}),`, and calls any connectors you include. Outside a `,_jsx(_components.a,{href:`/en/claude-projects#what-threads-pick-up-from-your-repositories`,children:`project`}),`’s threads, those skills include the ones committed to the cloned repository. You don’t choose a permission mode when you create the task: see `,_jsx(_components.a,{href:`#permission-prompts-during-a-run`,children:`Permission prompts during a run`}),` for when a run stops to wait for you.`]}),`\n`,_jsx(_components.p,{children:`What a scheduled task can reach is determined by:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The repositories you select`}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.a,{href:`/en/cloud-environments`,children:`environment’s`}),` network access and variables`]}),`\n`,_jsx(_components.li,{children:`The connectors you include`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Scope each of those to what the task needs.`}),`\n`,_jsxs(_components.p,{children:[`Scheduled tasks belong to your individual claude.ai account. They are not shared with teammates, and their runs count against your account’s `,_jsx(_components.a,{href:`#usage-and-limits`,children:`usage and limits`}),`. Anything a scheduled task does through your connected GitHub identity or connectors appears as you. Commits and pull requests carry your GitHub user, and Slack messages, Linear tickets, or other connector actions use your linked accounts for those services.`]}),`\n`,_jsx(Heading,{level:`3`,id:`create-from-the-web`,children:`Create from the web`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Open the creation dialog`,children:[_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),` and click `,_jsx(_components.strong,{children:`New task`}),` to open the `,_jsx(_components.strong,{children:`New scheduled task`}),` dialog. Check for these screens before you continue:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If the button reads `,_jsx(_components.strong,{children:`New routine`}),` instead of `,_jsx(_components.strong,{children:`New task`}),`, click `,_jsx(_components.strong,{children:`New routine`}),` and continue with `,_jsx(_components.a,{href:`#full-page-form`,children:`Full-page form`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`In the Desktop app, if a menu with `,_jsx(_components.strong,{children:`Local`}),` and `,_jsx(_components.strong,{children:`Cloud`}),` opens, go to `,_jsx(_components.a,{href:`#full-page-form`,children:`Full-page form`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If a menu opens with `,_jsx(_components.strong,{children:`Create with Claude`}),` and `,_jsx(_components.strong,{children:`Set up manually`}),`, select `,_jsx(_components.strong,{children:`Set up manually`}),` to open the dialog. `,_jsx(_components.strong,{children:`Create with Claude`}),` lets you describe the task in a chat and have Claude create it instead.`]}),`\n`,_jsxs(_components.li,{children:[`If a full page opens in place of the dialog, go to `,_jsx(_components.a,{href:`#full-page-form`,children:`Full-page form`}),`.`]}),`\n`]}),_jsxs(_components.p,{children:[`If `,_jsx(_components.strong,{children:`Repositories`}),` and `,_jsx(_components.strong,{children:`Environment`}),` are already showing when the dialog opens, see `,_jsx(_components.a,{href:`#dialog-with-repositories-and-environment-in-the-main-view`,children:`how that dialog differs`}),`. Otherwise, this dialog also creates scheduled tasks for claude.ai chat. To make yours what the dialog calls a Claude Code task, select a repository or add a GitHub event or API trigger in the steps that follow. That kind of task runs Claude Code in a cloud session.`]})]}),_jsxs(Step,{title:`Name the task and write the prompt`,children:[_jsx(_components.p,{children:`Give the scheduled task a descriptive name and write the prompt Claude runs each time. The prompt is the most important part: the task runs autonomously, so the prompt must be self-contained and explicit about what to do and what success looks like.`}),_jsx(_components.p,{children:`When a trigger fires, the session receives the saved prompt as its assignment and carries it out, rather than treating it as untrusted content that arrived mid-conversation. The trigger attests only that the prompt was stored ahead of time by an authorized session on your account. The fired prompt is therefore not live user input and can’t act as approval or consent for actions during the run. Content the session fetches during the run keeps its normal handling.`})]}),_jsxs(Step,{title:`Select a trigger`,children:[_jsxs(_components.p,{children:[`In the `,_jsx(_components.strong,{children:`Trigger`}),` row, choose how the task starts. To combine several triggers, click `,_jsx(_components.strong,{children:`+`}),` at the end of the row.`]}),_jsxs(Tabs,{children:[_jsx(Tab,{title:`Schedule`,id:`schedule`,children:_jsxs(_components.p,{children:[`Pick a preset frequency for a recurring run. See `,_jsx(_components.a,{href:`#add-a-schedule-trigger`,children:`Add a schedule trigger`}),` for timezone handling, late starts, custom cron intervals, and one-off runs.`]})}),_jsx(Tab,{title:`GitHub event`,id:`github-event`,children:_jsxs(_components.p,{children:[`Select the repository, the event to react to, and optional filters. See `,_jsx(_components.a,{href:`#add-a-github-trigger`,children:`Add a GitHub trigger`}),` for the full list of supported events and filter fields.`]})}),_jsx(Tab,{title:`API`,id:`api`,children:_jsxs(_components.p,{children:[`Select `,_jsx(_components.strong,{children:`API`}),` here. When you click `,_jsx(_components.strong,{children:`Create`}),`, the `,_jsx(_components.strong,{children:`API token`}),` dialog shows the token once, so copy it before you close the dialog. See `,_jsx(_components.a,{href:`#add-an-api-trigger`,children:`Add an API trigger`}),` to copy the URL or generate a new token.`]})})]})]}),_jsxs(Step,{title:`Select repositories`,children:[_jsxs(_components.p,{children:[`Expand `,_jsx(_components.strong,{children:`Advanced settings`}),`. Under `,_jsx(_components.strong,{children:`Repository`}),` on the `,_jsx(_components.strong,{children:`General`}),` tab, select one or more GitHub repositories for Claude to work in.`]}),_jsxs(_components.p,{children:[`Each repository is cloned at the start of a run. Claude creates `,_jsx(_components.code,{children:`claude/`}),`-prefixed branches for its changes.`]})]}),_jsxs(Step,{title:`Select an environment`,children:[_jsxs(_components.p,{children:[`After you select a repository, `,_jsx(_components.strong,{children:`Cloud environment`}),` appears below it. Pick a `,_jsx(_components.a,{href:`/en/cloud-environments`,children:`cloud environment`}),` for the task. Environments control what the cloud session has access to:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Network access`}),`: set the level of internet access available during each run`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Environment variables`}),`: provide values Claude can use during each run. They’re `,_jsx(_components.a,{href:`/en/cloud-environments#what-carries-over-from-your-setup`,children:`visible to anyone who uses the environment`}),`, so in an Anthropic-hosted environment, store keys for the APIs Claude calls during a run as `,_jsx(_components.a,{href:`/en/cloud-environments#add-network-secrets`,children:`network secrets`}),` instead. That section also lists the requests that never get a secret`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Setup script`}),`: install dependencies and tools the task needs. The result is `,_jsx(_components.a,{href:`/en/cloud-environments#environment-caching`,children:`cached`}),`, so the script doesn’t re-run on every session`]}),`\n`]}),_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`Default`}),` environment is provided with `,_jsx(_components.strong,{children:`Trusted`}),` network access, which allows only the `,_jsx(_components.a,{href:`/en/cloud-environments#default-allowed-domains`,children:`default allowlist`}),` of package registries, cloud provider APIs, container registries, and common development domains through the session’s network. Connectors you add to the task reach their services through Anthropic’s servers, so they don’t need allowlist changes.`]}),_jsxs(_components.p,{children:[`If your task needs to reach your own services directly, or a domain outside that list, edit the environment’s `,_jsx(_components.a,{href:`/en/cloud-environments#network-access`,children:`network access`}),` before running. To use a separate environment, `,_jsx(_components.a,{href:`/en/cloud-environments#configure-your-environment`,children:`create one`}),` first.`]})]}),_jsx(Step,{title:`Select a model and effort level`,children:_jsxs(_components.p,{children:[`Select a model in the prompt input’s model selector for Claude to use on every run. For a Claude Code task, if the model offers `,_jsx(_components.a,{href:`/en/model-config#adjust-effort-level`,children:`effort levels`}),`, `,_jsx(_components.strong,{children:`Effort`}),` in the same selector shows the current level. To change it, select another level. The selector’s `,_jsx(_components.strong,{children:`Default`}),` option offers no levels.`]})}),_jsx(Step,{title:`Review connectors`,children:_jsxs(_components.p,{children:[`Switch to the `,_jsx(_components.strong,{children:`Connectors`}),` tab of `,_jsx(_components.strong,{children:`Advanced settings`}),`. All of your connected `,_jsx(_components.a,{href:`/en/mcp`,children:`MCP connectors`}),` are included by default. Remove any the task doesn’t need: Claude can use an included connector during a run, including writes. For when a run stops to ask you first, see `,_jsx(_components.a,{href:`#permission-prompts-during-a-run`,children:`Permission prompts during a run`}),`.`]})}),_jsxs(Step,{title:`Create the task`,children:[_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create`}),`. The dialog closes and the new task’s detail page opens. The task runs the next time one of its triggers matches. To start a run immediately, click `,_jsx(_components.strong,{children:`Run now`}),` on the detail page.`]}),_jsxs(_components.p,{children:[`To see what a run did, click it in the `,_jsx(_components.strong,{children:`History`}),` list on the detail page. The run `,_jsx(_components.a,{href:`#view-and-interact-with-runs`,children:`opens as a full session`}),`, a new one for each run, where you can see what Claude did, review changes, and create a pull request.`]})]})]}),`\n`,_jsx(Heading,{level:`4`,id:`dialog-with-repositories-and-environment-in-the-main-view`,children:`Dialog with Repositories and Environment in the main view`}),`\n`,_jsxs(_components.p,{children:[`Follow the `,_jsx(_components.a,{href:`#create-from-the-web`,children:`steps to create from the web`}),`, and fill in each field in the dialog’s main view rather than under `,_jsx(_components.strong,{children:`Advanced settings`}),`. This dialog creates only Claude Code tasks.`]}),`\n`,_jsx(_components.p,{children:`Select the repository before you add a GitHub event trigger, because that trigger is unavailable until a repository is selected.`}),`\n`,_jsx(Heading,{level:`4`,id:`full-page-form`,children:`Full-page form`}),`\n`,_jsxs(_components.p,{children:[`In the Desktop app, if a menu with `,_jsx(_components.strong,{children:`Local`}),` and `,_jsx(_components.strong,{children:`Cloud`}),` opens, select `,_jsx(_components.strong,{children:`Cloud`}),`. A page titled `,_jsx(_components.strong,{children:`New routine`}),` or `,_jsx(_components.strong,{children:`New scheduled task`}),` opens. Fill in its fields:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: enter one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Instructions`}),`: enter the prompt. In the same box, select the model, the effort level if the model offers one, the repositories, and the environment. For what each one controls, see the steps under `,_jsx(_components.a,{href:`#create-from-the-web`,children:`Create from the web`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Select a trigger`}),`: select `,_jsx(_components.strong,{children:`Schedule`}),`, `,_jsx(_components.strong,{children:`GitHub event`}),`, or `,_jsx(_components.strong,{children:`API`}),`. For a schedule, see `,_jsx(_components.a,{href:`#add-a-schedule-trigger`,children:`Add a schedule trigger`}),`. For a `,_jsx(_components.a,{href:`#add-a-github-trigger`,children:`GitHub event`}),`, select a repository. For an `,_jsx(_components.a,{href:`#add-an-api-trigger`,children:`API trigger`}),`, copy the token from the `,_jsx(_components.strong,{children:`API token`}),` dialog that opens after you click `,_jsx(_components.strong,{children:`Create`}),`, because it is shown once. To combine several triggers, click `,_jsx(_components.strong,{children:`Add another trigger`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Connectors`}),`: all of your connected connectors are included by default, so remove the ones the task doesn’t need.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If `,_jsx(_components.strong,{children:`Create`}),` is unavailable, hover over it to see what the form still needs. Click `,_jsx(_components.strong,{children:`Create`}),`, and the task’s detail page opens.`]}),`\n`,_jsx(Heading,{level:`3`,id:`create-from-the-cli`,children:`Create from the CLI`}),`\n`,_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`/schedule`}),` in any session to create a scheduled task conversationally. You can also pass a description directly, for a recurring task like `,_jsx(_components.code,{children:`/schedule daily PR review at 9am`}),` or a one-off like `,_jsx(_components.code,{children:`/schedule clean up feature flag in one week`}),`. Claude walks through the same information the web dialog collects, then saves the task to your account. The command is also available under the alias `,_jsx(_components.code,{children:`/routines`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A successful start looks like a conversation: Claude asks follow-up questions about the schedule, repositories, and prompt before saving. If Claude instead replies that you need to authenticate or that it can’t connect to your remote claude.ai account, no scheduled task was created; see `,_jsx(_components.a,{href:`#troubleshooting`,children:`Troubleshooting`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A task you create with `,_jsx(_components.code,{children:`/schedule`}),` has a schedule trigger. You can also add the other trigger types:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API trigger`}),`: edit the task on the web at `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`#add-a-github-trigger`,children:`GitHub trigger`})}),`: edit the task on the web, or ask Claude in the CLI. Adding one from the CLI requires Claude Code v2.1.225 or later`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`A scheduled task with no schedule trigger, such as one started only by API calls or GitHub events, has no next run time. The CLI shows none when Claude saves or updates it.`}),`\n`,_jsx(Heading,{level:`2`,id:`configure-triggers`,children:`Configure triggers`}),`\n`,_jsxs(_components.p,{children:[`A scheduled task starts when one of its triggers matches. Add or remove a task’s triggers at any time in the `,_jsx(_components.strong,{children:`Trigger`}),` row of the task’s `,_jsx(_components.a,{href:`#edit-and-control-scheduled-tasks`,children:`edit dialog`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`When a task has two or more triggers, each one has a trash icon in that dialog. To remove a schedule or GitHub event trigger, click its trash icon, then `,_jsx(_components.strong,{children:`Save changes`}),`. To remove an API trigger, `,_jsx(_components.a,{href:`#add-an-api-trigger`,children:`delete its token`}),` instead.`]}),`\n`,_jsx(Heading,{level:`3`,id:`add-a-schedule-trigger`,children:`Add a schedule trigger`}),`\n`,_jsx(_components.p,{children:`A schedule trigger runs the task on a recurring cadence, or once at a specific future time. In the task’s creation or edit dialog on the web, pick a preset frequency such as hourly, daily, or weekly:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Runs on the hour`}),`: if you schedule a run exactly on the hour, such as 9:00, it can start several minutes late. To start close to the scheduled time, pick a few minutes past the hour, for example 9:07.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Custom intervals`}),`: for a cadence the presets lack, create the task and select `,_jsx(_components.strong,{children:`Custom`}),` in its `,_jsx(_components.a,{href:`#edit-and-control-scheduled-tasks`,children:`edit dialog`}),`. Then enter a cron expression, such as `,_jsx(_components.code,{children:`0 */2 * * *`}),` for every two hours. To set one from the CLI, run `,_jsx(_components.a,{href:`#manage-scheduled-tasks-from-the-cli`,children:_jsx(_components.code,{children:`/schedule update`})}),`. Expressions that run more often than once per hour are rejected.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Time zone`}),`: when you pick a preset frequency, enter the time in your local time zone.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cron expression time zone`}),`: when the expression is five fields alone, write the hours in UTC, so `,_jsx(_components.code,{children:`0 9 * * 1-5`}),` runs at 9:00 AM UTC on weekdays. If the field opens with a `,_jsx(_components.code,{children:`CRON_TZ=`}),` prefix, keep it and write the hours in its zone, or delete it and write them in UTC.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`schedule-a-one-off-run`,children:`Schedule a one-off run`}),`\n`,_jsx(_components.p,{children:`A one-off schedule runs the task a single time at a specific timestamp. For example, use it to:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Remind yourself later in the week`}),`\n`,_jsx(_components.li,{children:`Open a cleanup PR after a rollout finishes`}),`\n`,_jsx(_components.li,{children:`Start follow-up work after an upstream change ships`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`After the task runs, it turns itself off and the web UI marks it as `,_jsx(_components.strong,{children:`Completed`}),`. To run it again, open the task’s `,_jsx(_components.a,{href:`#edit-and-control-scheduled-tasks`,children:`edit dialog`}),` on the web and select `,_jsx(_components.strong,{children:`One-time`}),` or `,_jsx(_components.strong,{children:`Once`}),`, whichever label your dialog shows. Then set a new date and time in your local time zone and save.`]}),`\n`,_jsx(_components.p,{children:`Create a one-off run from the CLI by describing the time in natural language. Claude resolves the phrase against the current time and confirms the absolute timestamp before saving.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`/schedule tomorrow at 9am, summarize yesterday's merged PRs`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`/schedule in 2 weeks, open a cleanup PR that removes the feature flag`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`One-off runs count against the same hourly limit as other scheduled runs. See `,_jsx(_components.a,{href:`#usage-and-limits`,children:`Usage and limits`}),` for details.`]}),`\n`,_jsx(Heading,{level:`3`,id:`add-an-api-trigger`,children:`Add an API trigger`}),`\n`,_jsx(_components.p,{children:`An API trigger gives a scheduled task a dedicated HTTP endpoint. POSTing to the endpoint with the task’s bearer token starts a new session and returns a session URL. Use this to wire Claude Code into alerting systems, deploy pipelines, internal tools, or anywhere you can make an authenticated HTTP request.`}),`\n`,_jsxs(_components.p,{children:[`Add an API trigger on the web, either while you `,_jsx(_components.a,{href:`#create-from-the-web`,children:`create the task`}),` or later with the steps below. You can’t add an API trigger or manage its token from the CLI.`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open the task for editing`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),`, click the scheduled task you want to trigger via API, then open the menu next to its name and select `,_jsx(_components.strong,{children:`Edit`}),`. The `,_jsx(_components.strong,{children:`Edit scheduled task`}),` dialog opens.`]})}),_jsx(Step,{title:`Add an API trigger`,children:_jsxs(_components.p,{children:[`In the `,_jsx(_components.strong,{children:`Trigger`}),` row, click `,_jsx(_components.strong,{children:`+`}),` and select `,_jsx(_components.strong,{children:`API`}),` from the menu that opens. A panel with the `,_jsx(_components.strong,{children:`Fire URL`}),` and `,_jsx(_components.strong,{children:`Token`}),` for this task appears.`]})}),_jsxs(Step,{title:`Copy the URL and generate a token`,children:[_jsxs(_components.p,{children:[`Copy the `,_jsx(_components.strong,{children:`Fire URL`}),`. Click `,_jsx(_components.strong,{children:`Generate token`}),`, then copy the token from the `,_jsx(_components.strong,{children:`Token generated`}),` dialog immediately. The token is shown once and can’t be retrieved later, so store it somewhere secure such as your alerting tool’s secret store.`]}),_jsxs(_components.p,{children:[`The API trigger takes effect as soon as you generate the token. You don’t need to click `,_jsx(_components.strong,{children:`Save changes`}),`, so close the dialog when you’re done.`]})]}),_jsx(Step,{title:`Call the endpoint`,children:_jsxs(_components.p,{children:[`Send the token in the `,_jsx(_components.code,{children:`Authorization: Bearer`}),` header when you POST to the URL. `,_jsx(_components.a,{href:`#trigger-a-scheduled-task`,children:`Trigger a scheduled task`}),` shows a complete example.`]})})]}),`\n`,_jsxs(_components.p,{children:[`Each scheduled task has its own token, scoped to triggering that task only. To turn off API access or rotate the token, `,_jsxs(_components.a,{href:`#edit-and-control-scheduled-tasks`,children:[`open the task’s `,_jsx(_components.strong,{children:`Edit scheduled task`}),` dialog`]}),` again. Both controls are next to the token in the API trigger’s panel and take effect immediately:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Turn off API access`}),`: click `,_jsx(_components.strong,{children:`Delete token`}),`, the trash icon next to `,_jsx(_components.strong,{children:`Regenerate`}),`. This removes the API trigger`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rotate the token`}),`: click `,_jsx(_components.strong,{children:`Regenerate`}),`. The previous token stops working, and the `,_jsx(_components.strong,{children:`Token generated`}),` dialog shows the new one once`]}),`\n`]}),`\n`,_jsx(`span`,{id:`trigger-a-routine`}),`\n`,_jsx(Heading,{level:`4`,id:`trigger-a-scheduled-task`,children:`Trigger a scheduled task`}),`\n`,_jsxs(_components.p,{children:[`Send a POST request to the `,_jsx(_components.code,{children:`/fire`}),` endpoint with the bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header. The request body accepts an optional `,_jsx(_components.code,{children:`text`}),` field for run-specific context such as an alert body or a failing log, passed to the task alongside its saved prompt. The value is freeform text and is not parsed: if you send JSON or another structured payload, the task receives it as a literal string.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`text`}),` value doesn’t reach the routine as a bare message. It arrives wrapped in a `,_jsx(_components.code,{children:`\u003croutine-fire-payload>`}),` block that labels it as untrusted data and tells Claude not to follow instructions inside it unless the routine’s own prompt says to. The same wrapping applies to text supplied with `,_jsx(_components.strong,{children:`Run now`}),` in the web UI.`]}),`\n`,_jsxs(_components.p,{children:[`This means a routine’s saved prompt must opt in to acting on fire text: write the prompt to reference the payload explicitly, for example “Investigate the alert described in the routine-fire-payload block”, or the routine treats the text as inert context. Anyone holding the bearer token can send `,_jsx(_components.code,{children:`text`}),`, so the wrapper makes fire text from a leaked token arrive labeled as untrusted data rather than as direct instructions to your routine.`]}),`\n`,_jsxs(_components.p,{children:[`The example below triggers a scheduled task from a shell. The task ID and token shown are placeholders: replace them with the URL and token you copied when `,_jsx(_components.a,{href:`#add-an-api-trigger`,children:`adding the API trigger`}),`, or the request fails with a `,_jsx(_components.code,{children:`401`}),` authentication error:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.anthropic.com/v1/claude_code/routines/trig_01ABCDEFGHJKLMNOPQRSTUVW/fire`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-ant-oat01-xxxxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"anthropic-beta: experimental-cc-routine-2026-04-01\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"anthropic-version: 2023-06-01\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"text\": \"Sentry alert SEN-4521 fired in prod. Stack trace attached.\"}'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A successful request returns a JSON body with the new session ID and URL:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"routine_fire\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"claude_code_session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session_01HJKLMNOPQRSTUVWXYZ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"claude_code_session_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://claude.ai/code/session_01HJKLMNOPQRSTUVWXYZ\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Open the session URL in a browser to watch the run in real time, review changes, or continue the conversation manually.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`/fire`}),` endpoint ships under the `,_jsx(_components.code,{children:`experimental-cc-routine-2026-04-01`}),` beta header. Request and response shapes, rate limits, and token semantics may change while the feature is in research preview. Breaking changes ship behind new dated beta header versions, and the two most recent previous header versions continue to work so that callers have time to migrate.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`api-reference`,children:`API reference`}),`\n`,_jsxs(_components.p,{children:[`For the full API reference, including all error responses, validation rules, and field limits, see `,_jsx(_components.a,{href:`https://platform.claude.com/docs/en/api/claude-code/routines-fire`,children:`Trigger a routine through the API`}),` in the Claude Platform documentation.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`/fire`}),` endpoint is available to claude.ai users only and is not part of the Claude Platform API surface.`]}),`\n`,_jsx(Heading,{level:`3`,id:`add-a-github-trigger`,children:`Add a GitHub trigger`}),`\n`,_jsx(_components.p,{children:`A GitHub trigger starts a new session automatically when a matching event occurs on a connected repository. Claude Code doesn’t reuse sessions across events, so two PR updates produce two independent sessions.`}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`GitHub webhook events are subject to per-task and per-account hourly caps. Events beyond the limit are dropped until the window resets.`})}),`\n`,_jsx(_components.p,{children:`The Claude GitHub App must be installed on the repository you want to subscribe to, whichever surface you configure the trigger from.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Configure GitHub triggers from the web UI, which prompts you to install the app when it’s missing. Follow the steps below to configure one on the web.`}),`\n`,_jsxs(_components.li,{children:[`From the CLI, install the app from the `,_jsx(_components.a,{href:`https://github.com/apps/claude`,children:`GitHub App page`}),` first, then ask Claude to attach a GitHub trigger to an existing scheduled task, for example `,_jsx(_components.code,{children:`/schedule add a GitHub trigger to my nightly review for pull requests opened in acme/webapp`}),`. The CLI path requires Claude Code v2.1.225 or later. When Claude adds the trigger, it replies with a link to the task the trigger fires.`]}),`\n`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open the task for editing`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),`, click the scheduled task, then open the menu next to its name and select `,_jsx(_components.strong,{children:`Edit`}),`. The `,_jsx(_components.strong,{children:`Edit scheduled task`}),` dialog opens.`]})}),_jsxs(Step,{title:`Add a GitHub event trigger`,children:[_jsxs(_components.p,{children:[`In the `,_jsx(_components.strong,{children:`Trigger`}),` row, click `,_jsx(_components.strong,{children:`+`}),` and select `,_jsx(_components.strong,{children:`GitHub event`}),` from the menu that opens.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Running `,_jsx(_components.code,{children:`/web-setup`}),` in the CLI grants repository access for cloning, but it does not install the Claude GitHub App and does not enable webhook delivery.`]})})]}),_jsx(Step,{title:`Configure the trigger`,children:_jsxs(_components.p,{children:[`Change the repository if needed, choose an event from the `,_jsx(_components.a,{href:`#supported-events`,children:`supported events`}),` list, and optionally add filters. Then click `,_jsx(_components.strong,{children:`Save changes`}),` at the bottom of the dialog to apply the trigger.`]})})]}),`\n`,_jsx(Heading,{level:`4`,id:`supported-events`,children:`Supported events`}),`\n`,_jsxs(_components.p,{children:[`Choose an event from any of the following categories. Within each category you can pick a specific action, such as `,_jsx(_components.code,{children:`pull_request.opened`}),`, or react to all actions in the category.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Event`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Triggers when`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Pull request`}),_jsx(_components.td,{style:{textAlign:`left`},children:`A PR is opened, closed, assigned, labeled, synchronized, or otherwise updated`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Release`}),_jsx(_components.td,{style:{textAlign:`left`},children:`A release is created, published, edited, or deleted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Issue`}),_jsx(_components.td,{style:{textAlign:`left`},children:`An issue is opened, edited, closed, reopened, labeled, assigned, or otherwise updated`})]})]})]}),`\n`,_jsx(Heading,{level:`4`,id:`filter-pull-requests`,children:`Filter pull requests`}),`\n`,_jsx(_components.p,{children:`Use filters to narrow which pull requests start a new session. All filter conditions must match for the scheduled task to trigger. The available filter fields are:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Filter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Matches`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Author`}),_jsx(_components.td,{style:{textAlign:`left`},children:`PR author’s GitHub username`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Title`}),_jsx(_components.td,{style:{textAlign:`left`},children:`PR title text`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Body`}),_jsx(_components.td,{style:{textAlign:`left`},children:`PR description text`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Base branch`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Branch the PR targets`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Head branch`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Branch the PR comes from`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Labels`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Labels applied to the PR`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Is draft`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Whether the PR is in draft state`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Is merged`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Whether the PR has been merged`})]})]})]}),`\n`,_jsx(_components.p,{children:`Each filter pairs a field with an operator: equals, contains, starts with, is one of, is not one of, or matches regex.`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`matches regex`}),` operator tests the entire field value, not a substring within it. To match any title containing `,_jsx(_components.code,{children:`hotfix`}),`, write `,_jsx(_components.code,{children:`.*hotfix.*`}),`. Without the surrounding `,_jsx(_components.code,{children:`.*`}),`, the filter matches only a title that is exactly `,_jsx(_components.code,{children:`hotfix`}),` with nothing before or after. For literal substring matching without regex syntax, use the `,_jsx(_components.code,{children:`contains`}),` operator instead.`]}),`\n`,_jsx(_components.p,{children:`A few example filter combinations:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Auth module review`}),`: base branch `,_jsx(_components.code,{children:`main`}),`, head branch contains `,_jsx(_components.code,{children:`auth-provider`}),`. Sends any PR that touches authentication to a focused reviewer.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ready-for-review only`}),`: is draft is `,_jsx(_components.code,{children:`false`}),`. Skips drafts so the task only runs when the PR is ready for review.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Label-gated backport`}),`: labels include `,_jsx(_components.code,{children:`needs-backport`}),`. Triggers a port-to-another-branch task only when a maintainer tags the PR.`]}),`\n`]}),`\n`,_jsx(`span`,{id:`manage-routines`}),`\n`,_jsx(Heading,{level:`2`,id:`manage-scheduled-tasks`,children:`Manage scheduled tasks`}),`\n`,_jsx(_components.p,{children:`Click a scheduled task in the list to open its detail page. The detail page shows the task’s repositories, connectors, prompt, schedule, API tokens, GitHub triggers, and a list of past runs.`}),`\n`,_jsx(Heading,{level:`3`,id:`view-and-interact-with-runs`,children:`View and interact with runs`}),`\n`,_jsx(_components.p,{children:`Click any run to open it as a full session. From there you can see what Claude did, review changes, create a pull request, or continue the conversation. Each run session works like any other session: use the dropdown menu next to the session title to rename, archive, or delete it.`}),`\n`,_jsxs(_components.p,{children:[`Under `,_jsx(_components.strong,{children:`History`}),` on the task’s detail page, each finished run’s row ends with `,_jsx(_components.strong,{children:`Error`}),` if the run failed, `,_jsx(_components.strong,{children:`Cancelled`}),` if it was cancelled, and neither word if it succeeded. The `,_jsx(_components.strong,{children:`Status`}),` filter names the same three outcomes `,_jsx(_components.strong,{children:`Failed`}),`, `,_jsx(_components.strong,{children:`Cancelled`}),`, and `,_jsx(_components.strong,{children:`Succeeded`}),`. These outcomes say how the session ended, not whether Claude completed the work your prompt describes, so open the run and read its transcript to see what happened.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Succeeded`}),`: the session ended without Claude Code reporting a failure. Blocked network requests, missing connector tools, and work Claude couldn’t complete appear in the transcript rather than on the row`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Failed`}),`: the session didn’t finish normally. For example, it stopped unexpectedly, ended on an error, or was archived before the run started`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cancelled`}),`: the run didn’t fail, and its session was archived. If you archive the session of a run that succeeded, the run changes to `,_jsx(_components.strong,{children:`Cancelled`}),`. Nothing in the task needs to change`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If a warning appears under `,_jsx(_components.strong,{children:`History`}),`, see `,_jsx(_components.a,{href:`#the-last-run-didnt-start`,children:`“The last run” warnings`}),`.`]}),`\n`,_jsx(`span`,{id:`edit-and-control-routines`}),`\n`,_jsx(Heading,{level:`3`,id:`edit-and-control-scheduled-tasks`,children:`Edit and control scheduled tasks`}),`\n`,_jsx(_components.p,{children:`From the detail page you can:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Run now`}),` to start a run immediately without waiting for the next scheduled time.`]}),`\n`,_jsx(_components.li,{children:`Use the on/off switch at the top of the page to pause or resume the schedule. Paused tasks keep their configuration but don’t run until you turn them back on.`}),`\n`,_jsxs(_components.li,{children:[`Open the menu next to the task’s name and select `,_jsx(_components.strong,{children:`Edit`}),` to change the name, prompt, repositories, environment, connectors, or any of the task’s triggers. The `,_jsx(_components.strong,{children:`Edit scheduled task`}),` dialog opens with the same layout as the `,_jsx(_components.a,{href:`#create-from-the-web`,children:`creation dialog`}),`. To add a trigger, click `,_jsx(_components.strong,{children:`+`}),` in the `,_jsx(_components.strong,{children:`Trigger`}),` row. Click `,_jsx(_components.strong,{children:`Save changes`}),` to apply your edits. API token actions take effect immediately, without `,_jsx(_components.strong,{children:`Save changes`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Open the same menu and select `,_jsx(_components.strong,{children:`Delete`}),` to delete the task.`]}),`\n`]}),`\n`,_jsx(`span`,{id:`manage-routines-from-the-cli`}),`\n`,_jsx(Heading,{level:`3`,id:`manage-scheduled-tasks-from-the-cli`,children:`Manage scheduled tasks from the CLI`}),`\n`,_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`/schedule list`}),` to see your scheduled tasks, `,_jsx(_components.code,{children:`/schedule update`}),` to change one, or `,_jsx(_components.code,{children:`/schedule run`}),` to start one immediately.`]}),`\n`,_jsxs(_components.p,{children:[`You can also ask about a scheduled task’s run history, for example `,_jsx(_components.code,{children:`/schedule why did my nightly review do nothing this morning?`}),`. Claude lists the task’s recent runs with their status and a link to `,_jsx(_components.a,{href:`#view-and-interact-with-runs`,children:`open each run on the web`}),`. It also reads a run’s log to explain what happened, including tool errors, permission denials, and the final result. Requires Claude Code v2.1.227 or later.`]}),`\n`,_jsx(Heading,{level:`3`,id:`repositories-and-branch-permissions`,children:`Repositories and branch permissions`}),`\n`,_jsxs(_components.p,{children:[`Scheduled tasks need GitHub access to clone repositories. When you create a scheduled task from the CLI with `,_jsx(_components.code,{children:`/schedule`}),`, Claude checks whether your account has GitHub access for the repository you ran it from. If it doesn’t, Claude adds a setup note naming how to grant it.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/en/claude-code-on-the-web#github-authentication-options`,children:`GitHub authentication options`}),` for the two ways to grant access. On Team and Enterprise plans, an `,_jsx(_components.a,{href:`/en/server-managed-settings#access-control`,children:`Owner`}),` of your Claude organization has to turn on each method before you can use it; see `,_jsx(_components.a,{href:`/en/web-quickstart#connect-github`,children:`Connect GitHub`}),`.`]})}),`\n`,_jsx(_components.p,{children:`If your GitHub connection is missing or expired when a run is due, the scheduled task skips runs until you reconnect, for up to 72 hours. Reconnect GitHub within that window and the task resumes on its own. After 72 hours without a connection, the task turns off, and you turn it back on after reconnecting GitHub.`}),`\n`,_jsxs(_components.p,{children:[`Each repository you add is cloned on every run. Claude starts from the repository’s default branch unless your prompt specifies otherwise. If a `,_jsx(_components.a,{href:`#add-a-github-trigger`,children:`GitHub pull request event`}),` triggers the run and the pull request’s repository is the task’s first repository, that repository starts from the pull request’s head commit instead.`]}),`\n`,_jsxs(_components.p,{children:[`Claude pushes its work to a branch prefixed with `,_jsx(_components.code,{children:`claude/`}),` unless your prompt directs it to push to another branch. To control which branches a run can push to, use branch protection rules or rulesets on GitHub. For runs on Anthropic-managed infrastructure, and for self-hosted runs that push through `,_jsx(_components.a,{href:`/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy`,children:`Anthropic’s git proxy`}),`, GitHub applies them to the GitHub access you connected, so a rule that access can bypass doesn’t block a run’s push. A self-hosted run that pushes with the git credentials your deployment provides is checked against those instead. See `,_jsx(_components.a,{href:`/en/self-hosted-environments-deploy#configure-git`,children:`Configure git`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`connectors`,children:`Connectors`}),`\n`,_jsx(_components.p,{children:`Scheduled tasks can use your connected MCP connectors to read from and write to external services during each run. For example, a task that triages support requests might read from a Slack channel and create issues in Linear.`}),`\n`,_jsxs(_components.p,{children:[`Connectors are the `,_jsx(_components.a,{href:`/en/mcp#use-mcp-servers-from-claude-ai`,children:`claude.ai integrations`}),` on your account. MCP servers you added locally in the CLI with `,_jsx(_components.code,{children:`claude mcp add`}),` are stored on your machine rather than your claude.ai account, so they do not appear in the connectors list. To use one of those servers in a scheduled task:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`As a connector`}),`: add it as a connector at `,_jsx(_components.a,{href:`https://claude.ai/customize/connectors`,children:`claude.ai/customize/connectors`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`In the repository`}),`: for a scheduled task with one repository, you can instead declare the server in a committed `,_jsx(_components.a,{href:`/en/mcp#project-scope`,children:_jsx(_components.code,{children:`.mcp.json`})}),`, unless the task runs as threads in a `,_jsx(_components.a,{href:`/en/claude-projects#what-threads-pick-up-from-your-repositories`,children:`project`}),`. If it does, add the server as a connector.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`When you create a scheduled task, all of your currently connected connectors are included by default. Remove any that aren’t needed to limit which tools Claude has access to during the run. You can also add connectors directly from the task’s creation or edit dialog.`}),`\n`,_jsxs(_components.p,{children:[`To manage or add connectors outside of that dialog, visit `,_jsx(_components.a,{href:`https://claude.ai/customize/connectors`,children:`claude.ai/customize/connectors`}),` or use `,_jsx(_components.code,{children:`/schedule update`}),` in the CLI.`]}),`\n`,_jsx(Heading,{level:`3`,id:`permission-prompts-during-a-run`,children:`Permission prompts during a run`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`For a task that runs in your organization’s self-hosted environment, see `,_jsx(_components.a,{href:`/en/self-hosted-environments-configuration#permissions-and-tool-approval`,children:`Permissions and tool approval`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`When a run starts a new session on Anthropic’s cloud, that session begins in `,_jsx(_components.a,{href:`/en/permission-modes#eliminate-prompts-with-auto-mode`,children:`auto mode`}),` unless auto mode is unavailable. In auto mode, a classifier model allows or blocks actions that would otherwise wait for your approval.`]}),`\n`,_jsx(_components.p,{children:`A run still stops and waits for an answer in cases such as these:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Actions that prompt even in auto mode`}),`: for example, an action that matches an `,_jsx(_components.a,{href:`/en/permissions#manage-permissions`,children:`ask rule`}),`. See `,_jsx(_components.a,{href:`/en/permission-modes#how-auto-mode-evaluates-actions`,children:`How auto mode evaluates actions`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Repeated blocks`}),`: one block doesn’t end the run. Once blocks reach auto mode’s `,_jsx(_components.a,{href:`/en/permission-modes#repeated-block-thresholds`,children:`repeated-block thresholds`}),`, a permission prompt appears in the run’s session and waits until someone answers it`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If auto mode is unavailable, such as when your organization turned it off or the task’s model doesn’t support it, the run keeps the permission mode it launched in. To answer a waiting prompt, open the run from the task’s `,_jsx(_components.a,{href:`#view-and-interact-with-runs`,children:`detail page`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`In a `,_jsx(_components.a,{href:`/en/claude-projects`,children:`project`}),`, a run can continue a thread rather than start a new session. That run keeps whatever permission mode the thread is in at the time. When that thread was made, it started in auto mode unless auto mode was unavailable. To answer a prompt waiting in that thread, see `,_jsx(_components.a,{href:`/en/claude-projects#unblock-a-thread-waiting-on-approval`,children:`Unblock a thread waiting on approval`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`when-a-run-publishes-an-artifact-without-asking`,children:`When a run publishes an artifact without asking`}),`\n`,_jsxs(_components.p,{children:[`During a run in `,_jsx(_components.a,{href:`#permission-prompts-during-a-run`,children:`auto mode`}),`, Claude publishes an `,_jsx(_components.a,{href:`/en/artifacts`,children:`artifact`}),` without asking you once the classifier allows the publish. You’re still asked first when, for example, the publish matches an `,_jsx(_components.a,{href:`/en/permissions#manage-permissions`,children:`ask rule`}),`. A new artifact is visible only to you until you `,_jsx(_components.a,{href:`/en/artifacts#share-an-artifact`,children:`share it`}),`. The `,_jsx(_components.a,{href:`#artifacts-in-accept-edits-mode`,children:`Accept edits rules`}),` that follow don’t apply in auto mode.`]}),`\n`,_jsx(_components.p,{children:`When a scheduled task’s job is to keep a page current, give it an artifact you already published.`}),`\n`,_jsx(Heading,{level:`4`,id:`artifacts-in-accept-edits-mode`,children:`Artifacts in Accept edits mode`}),`\n`,_jsxs(_components.p,{children:[`When a scheduled task’s schedule or `,_jsx(_components.strong,{children:`Run now`}),` starts a run, Claude can publish a new `,_jsx(_components.a,{href:`/en/artifacts`,children:`artifact`}),` without asking. The new artifact is visible only to you until you `,_jsx(_components.a,{href:`/en/artifacts#share-an-artifact`,children:`share it`}),`. If the publish declares runtime capabilities for the page, such as `,_jsx(_components.a,{href:`/en/artifacts#pull-live-data-with-mcp-connectors`,children:`connector calls`}),` or `,_jsx(_components.a,{href:`/en/artifacts#offer-a-file-download`,children:`file downloads`}),`, Claude asks first.`]}),`\n`,_jsx(_components.p,{children:`In those runs, Claude republishes an existing artifact without asking only when all of these hold:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You can edit the artifact and it belongs to your own organization`}),`\n`,_jsx(_components.li,{children:`If the publish carries more than the page, such as supporting files, you own the artifact`}),`\n`,_jsx(_components.li,{children:`The artifact isn’t shared publicly`}),`\n`,_jsx(_components.li,{children:`If the artifact is shared with specific people or your organization, its viewers don’t automatically see each new version`}),`\n`,_jsx(_components.li,{children:`The publish doesn’t force over a newer version`}),`\n`,_jsx(_components.li,{children:`The publish doesn’t declare runtime capabilities for the page`}),`\n`,_jsxs(_components.li,{children:[`The existing page holds no grant that reaches beyond the page, such as `,_jsx(_components.a,{href:`/en/artifacts#pull-live-data-with-mcp-connectors`,children:`connector calls`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`In every other case, including a run that an API or GitHub trigger starts, Claude asks first.`}),`\n`,_jsx(Heading,{level:`3`,id:`environments-and-network-access`,children:`Environments and network access`}),`\n`,_jsxs(_components.p,{children:[`Each scheduled task uses a `,_jsx(_components.a,{href:`/en/cloud-environments`,children:`cloud environment`}),` that controls network access, environment variables, and setup scripts. The task inherits the environment’s network policy on every run.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Default`}),` environment uses `,_jsx(_components.strong,{children:`Trusted`}),` network access, which allows only the `,_jsx(_components.a,{href:`/en/cloud-environments#default-allowed-domains`,children:`default allowlist`}),` through the session’s network. Requests on that path to hosts outside the allowlist fail with `,_jsx(_components.code,{children:`403`}),` and `,_jsx(_components.code,{children:`x-deny-reason: host_not_allowed`}),`. MCP connector traffic is routed through Anthropic’s servers rather than that path, so the connectors you add to the task work without adding their hosts to `,_jsx(_components.strong,{children:`Allowed domains`}),`. Remove any connectors you don’t need under `,_jsx(_components.a,{href:`#connectors`,children:`Connectors`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`To allow additional domains on one of your own environments, follow these steps. An `,_jsx(_components.a,{href:`/en/cloud-environments#organization-shared-environments`,children:`organization-shared environment`}),` opens read-only here, so an Owner changes its network access from the `,_jsx(_components.strong,{children:`Cloud environments`}),` page in `,_jsx(_components.a,{href:`https://claude.ai/admin-settings`,children:`admin settings`}),` instead.`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open the task for editing`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),`, click the scheduled task, then open the menu next to its name and select `,_jsx(_components.strong,{children:`Edit`}),`. The `,_jsx(_components.strong,{children:`Edit scheduled task`}),` dialog opens.`]})}),_jsx(Step,{title:`Open the environment selector`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Advanced settings > General > Cloud environment`}),`, expanding `,_jsx(_components.strong,{children:`Advanced settings`}),` first if it’s collapsed. Click the cloud icon showing your environment’s name, such as `,_jsx(_components.strong,{children:`Default`}),`.`]})}),_jsx(Step,{title:`Open the environment settings`,children:_jsx(_components.p,{children:`Hover over the environment in the list and click the settings icon that appears on the right.`})}),_jsx(Step,{title:`Change the network access level`,children:_jsxs(_components.p,{children:[`In the `,_jsx(_components.strong,{children:`Edit cloud environment`}),` dialog, change `,_jsx(_components.strong,{children:`Network access`}),` to `,_jsx(_components.strong,{children:`Custom`}),` and enter your domains in `,_jsx(_components.strong,{children:`Allowed domains`}),`. Check `,_jsx(_components.strong,{children:`Also include default list of common package managers`}),` to keep the `,_jsx(_components.a,{href:`/en/cloud-environments#default-allowed-domains`,children:`default allowlist`}),` alongside your custom domains. Select `,_jsx(_components.strong,{children:`Full`}),` instead for unrestricted access.`]})}),_jsx(Step,{title:`Save`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Save changes`}),` in the `,_jsx(_components.strong,{children:`Edit cloud environment`}),` dialog, then close the `,_jsx(_components.strong,{children:`Edit scheduled task`}),` dialog behind it. The new policy applies from the next run.`]})})]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/en/cloud-environments#network-access`,children:`Network access`}),` for details on access levels and the default allowlist.`]}),`\n`,_jsx(Heading,{level:`2`,id:`usage-and-limits`,children:`Usage and limits`}),`\n`,_jsxs(_components.p,{children:[`Scheduled tasks draw down subscription usage the same way interactive sessions do. See your current consumption at `,_jsx(_components.a,{href:`https://claude.ai/settings/usage`,children:`claude.ai/settings/usage`}),`.`]}),`\n`,_jsx(_components.p,{children:`Separately from subscription usage, each way of starting a run has an hourly limit:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Action`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Limit`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Counted for`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Over the limit`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Scheduled runs, including one-off runs`}),_jsx(_components.td,{style:{textAlign:`left`},children:`100 per hour`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Your account`}),_jsx(_components.td,{style:{textAlign:`left`},children:`The run waits until the limit resets`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.strong,{children:`Run now`}),`, API fires, and setting a one-off task to run again`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`30 per hour`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Each scheduled task, one count shared by all three`}),_jsx(_components.td,{style:{textAlign:`left`},children:`The action fails until the limit resets`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.strong,{children:`Run now`}),` and setting a one-off task to run again`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`100 per hour`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Your account`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Same`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`API fires`}),_jsx(_components.td,{style:{textAlign:`left`},children:`100 per hour`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Your account, counted separately from `,_jsx(_components.strong,{children:`Run now`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:`Same`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`GitHub events`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`See `,_jsx(_components.a,{href:`#add-a-github-trigger`,children:`Add a GitHub trigger`})]}),_jsx(_components.td,{style:{textAlign:`left`}}),_jsx(_components.td,{style:{textAlign:`left`}})]})]})]}),`\n`,_jsx(_components.p,{children:`None of these hourly limits has overage.`}),`\n`,_jsxs(_components.p,{children:[`When a scheduled task hits your subscription usage limit, organizations with usage credits turned on can keep running scheduled tasks on metered overage. Without usage credits, additional runs are rejected until your usage window resets. Turn on usage credits at `,_jsx(_components.a,{href:`https://claude.ai/settings/usage`,children:`claude.ai/settings/usage`}),`. On Team and Enterprise plans, an admin turns them on for the organization at `,_jsx(_components.a,{href:`https://claude.ai/admin-settings/usage`,children:`claude.ai/admin-settings/usage`}),`.`]}),`\n`,_jsx(_components.p,{children:`While your subscription is paused, your scheduled tasks are put on hold and don’t run. Once your subscription is active again, turn them back on.`}),`\n`,_jsx(Heading,{level:`2`,id:`where-the-name-routines-still-appears`,children:`Where the name routines still appears`}),`\n`,_jsx(_components.p,{children:`Scheduled tasks were previously called routines, and these places keep the earlier name. Each one refers to the same feature:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`App`}),`: in some accounts the sidebar entry and page title read `,_jsx(_components.strong,{children:`Routines`}),`, the button reads `,_jsx(_components.strong,{children:`New routine`}),`, and other labels say routine. To create a task there, see `,_jsx(_components.a,{href:`#full-page-form`,children:`Full-page form`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Web address`}),`: `,_jsx(_components.code,{children:`claude.ai/code/routines`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CLI`}),`: the `,_jsx(_components.code,{children:`/routines`}),` alias for `,_jsx(_components.code,{children:`/schedule`}),`, the command’s description, and Claude’s replies while it sets up a task`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API`}),`: the `,_jsx(_components.code,{children:`/fire`}),` endpoint path, its beta header, its response `,_jsx(_components.code,{children:`type`}),`, the `,_jsx(_components.code,{children:`\u003croutine-fire-payload>`}),` tag, and the `,_jsx(_components.a,{href:`https://platform.claude.com/docs/en/api/claude-code/routines-fire`,children:`Trigger a routine through the API`}),` reference page`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Organization settings`}),`: the `,_jsx(_components.strong,{children:`Scheduled tasks (Was Routines)`}),` toggle`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(Heading,{level:`3`,id:`schedule-returns-unknown-command`,children:[_jsx(_components.code,{children:`/schedule`}),` returns “Unknown command”`]}),`\n`,_jsxs(_components.p,{children:[`The CLI hides `,_jsx(_components.code,{children:`/schedule`}),` when one of its requirements isn’t met: the command menu shows `,_jsx(_components.code,{children:`No commands match \"/schedule\"`}),` while you type. Submitting it returns `,_jsx(_components.code,{children:`Unknown command: /schedule`}),`, except in the cases below that note a different answer.`]}),`\n`,_jsx(_components.p,{children:`The cause is usually one of the following:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`You are authenticated with a Console API key, an `,_jsx(_components.a,{href:`/en/authentication#anthropic-profiles-and-federation-credentials`,children:`Anthropic profile or federation credential`}),`, or a cloud provider such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `,_jsx(_components.code,{children:`/schedule`}),` requires a claude.ai subscription login. With a Console API key or a profile, and feature-flag fetching enabled, submitting `,_jsx(_components.code,{children:`/schedule`}),` instead shows `,_jsx(_components.code,{children:`/schedule is available with Claude for Enterprise — ask your admin about migrating from API-key access`}),`. With a cloud-provider login, you still see `,_jsx(_components.code,{children:`Unknown command: /schedule`}),`. If `,_jsx(_components.code,{children:`ANTHROPIC_API_KEY`}),` or `,_jsx(_components.code,{children:`ANTHROPIC_AUTH_TOKEN`}),` is set in your shell, or `,_jsx(_components.code,{children:`apiKeyHelper`}),` is set in `,_jsx(_components.code,{children:`settings.json`}),`, remove it first, since these take precedence over a claude.ai login. A profile or federation credential takes precedence too, so switch that off as well`]}),`\n`,_jsxs(_components.li,{children:[`You are fully signed out, with no API key or other credential. With feature-flag fetching enabled, submitting `,_jsx(_components.code,{children:`/schedule`}),` shows `,_jsx(_components.code,{children:`/schedule requires a claude.ai subscription. Run /login to sign in with your claude.ai account.`}),` Before v2.1.268, a signed-out session showed the same Claude for Enterprise message as a Console API key`]}),`\n`,_jsxs(_components.li,{children:[`You are inside a cloud session, where submitting `,_jsx(_components.code,{children:`/schedule`}),` answers that the command isn’t available in that environment. Manage scheduled tasks from the `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`web UI`}),` instead`]}),`\n`,_jsxs(_components.li,{children:[`Your organization’s policy disables `,_jsx(_components.a,{href:`/en/claude-code-on-the-web`,children:`cloud sessions`}),`, which scheduled tasks require. In this case, submitting `,_jsx(_components.code,{children:`/schedule`}),` answers `,_jsx(_components.a,{href:`/en/errors#cloud-sessions-are-disabled-by-your-organizations-policy`,children:_jsx(_components.code,{children:`Cloud sessions are disabled by your organization's policy`})}),` instead. Before v2.1.268, it returned `,_jsx(_components.code,{children:`Unknown command: /schedule`})]}),`\n`,_jsxs(_components.li,{children:[`An Owner `,_jsx(_components.a,{href:`#routines-are-disabled-by-your-organizations-policy`,children:`turned off scheduled tasks`}),` for your Team or Enterprise organization. Before v2.1.227, the command still appeared in this case, and claude.ai rejected the task when Claude tried to create or run it`]}),`\n`,_jsxs(_components.li,{children:[`Your Enterprise organization manages your access with `,_jsx(_components.a,{href:`https://support.claude.com/en/articles/13930452`,children:`custom roles`}),`, and none of your roles includes the scheduled tasks permission under `,_jsx(_components.strong,{children:`Remote sessions`}),`. Ask an Owner to add it to one of your roles`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If the cause is your CLI sign-in or being inside a cloud session, you can still create and manage scheduled tasks at `,_jsx(_components.a,{href:`https://claude.ai/code/routines`,children:`claude.ai/code/routines`}),`. You need a Pro, Max, Team, or Enterprise account there. If scheduled tasks or cloud sessions are off for your organization or missing from your roles, you can’t create them on the web either.`]}),`\n`,_jsx(Heading,{level:`3`,id:`routines-are-disabled-by-your-organizations-policy`,children:`“Routines are disabled by your organization’s policy”`}),`\n`,_jsxs(_components.p,{children:[`An Owner in your Team or Enterprise organization has likely turned off the `,_jsx(_components.strong,{children:`Scheduled tasks (Was Routines)`}),` toggle at `,_jsx(_components.a,{href:`https://claude.ai/admin-settings/capabilities`,children:_jsx(_components.strong,{children:`Organization settings > Capabilities > Remote sessions`})}),`. On Claude Code v2.1.227 or later, the same toggle also hides `,_jsx(_components.code,{children:`/schedule`}),` in the CLI. This is a server-side organization setting, so it cannot be overridden from your local configuration. Ask an Owner to turn scheduled tasks back on for your organization.`]}),`\n`,_jsx(Heading,{level:`3`,id:`the-last-run-didnt-start`,children:`“The last run” warnings`}),`\n`,_jsxs(_components.p,{children:[`When a warning under `,_jsx(_components.strong,{children:`History`}),` begins with “The last run”, find it in the first column and do what its row says. The warning clears once a later run starts.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Warning`}),_jsx(_components.th,{style:{textAlign:`left`},children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run didn’t start because your organization had reached its limit on cloud sessions running at once.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The task needs no change. Click `,_jsx(_components.strong,{children:`Run now`}),` later, or wait for the next run`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run didn’t start because its cloud environment couldn’t be found or used.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`On the task’s detail page, open the menu next to its name, select `,_jsx(_components.strong,{children:`Edit`}),`, and find the `,_jsx(_components.a,{href:`#environments-and-network-access`,children:`cloud environment selector`}),`. If it reads `,_jsx(_components.strong,{children:`Unavailable environment`}),`, that environment was archived or is no longer available to your account, so choose another one there and save your changes. Otherwise, retry with `,_jsx(_components.strong,{children:`Run now`}),` on the detail page, or pick another environment in the selector and save your changes`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run was blocked because it couldn’t access something it needs, or your organization’s policy doesn’t allow it.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Check that your `,_jsx(_components.a,{href:`#repositories-and-branch-permissions`,children:`GitHub access`}),` covers the task’s repositories. If it does, ask an `,_jsx(_components.a,{href:`/en/server-managed-settings#access-control`,children:`Owner`}),` of your Claude organization whether a policy blocks the task`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run didn’t start because of a problem that’s usually temporary.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Click `,_jsx(_components.strong,{children:`Run now`}),` to try again, or wait for the next run`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run didn’t start because its repository or branch wasn’t available.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Check on GitHub that each repository in the task has the `,_jsx(_components.a,{href:`#repositories-and-branch-permissions`,children:`branch the run starts from`}),`. Also check that your `,_jsx(_components.a,{href:`#repositories-and-branch-permissions`,children:`GitHub access`}),` covers each repository, and reconnect GitHub if your connection expired`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run didn’t start because some of its settings weren’t accepted.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`On the task’s detail page, open the menu next to its name and select `,_jsx(_components.strong,{children:`Edit`}),`. The dialog doesn’t mark which setting wasn’t accepted, so check each one there, including the task’s name, prompt, model, repositories, environment, connectors, and triggers`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run stopped because a usage limit was reached.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`For when the task’s runs can start again after a usage limit, see `,_jsx(_components.a,{href:`#usage-and-limits`,children:`Usage and limits`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`”The last run failed.”`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Click `,_jsx(_components.strong,{children:`Run now`}),` to try again, or wait for the next run. The failed run has no session to open`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-resources`,children:`Related resources`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.a,{href:`/en/scheduled-tasks`,children:[_jsx(_components.code,{children:`/loop`}),` and in-session scheduling`]}),`: schedule local tasks within an open CLI session`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/desktop-scheduled-tasks`,children:`Desktop scheduled tasks`}),`: local scheduled tasks that run on your machine with access to local files`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/cloud-environments`,children:`Cloud environments`}),`: configure network access, environment variables, and setup scripts for cloud sessions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/claude-projects`,children:`Projects`}),`: ongoing work Claude coordinates across parallel cloud sessions; scheduled tasks created from a project appear on its `,_jsx(_components.strong,{children:`Scheduled tasks`}),` tab`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/mcp`,children:`MCP connectors`}),`: connect external services like Slack, Linear, and Google Drive`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/en/github-actions`,children:`GitHub Actions`}),`: run Claude in your CI pipeline on repository events`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Automate work with scheduled tasks","sidebarTitle":"Cloud scheduled tasks","description":"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.","keywords":["/schedule","schedule","scheduled task","routine","routines","/routines","cloud cron","remote schedule","trigger"],"href":"/en/routines"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example use cases","slug":"example-use-cases","depth":2,"children":[]},{"title":"Create a scheduled task","slug":"create-a-scheduled-task","depth":2,"children":[{"title":"Create from the web","slug":"create-from-the-web","depth":3,"children":[]},{"title":"Dialog with Repositories and Environment in the main view","slug":"dialog-with-repositories-and-environment-in-the-main-view","depth":4,"children":[]},{"title":"Full-page form","slug":"full-page-form","depth":4,"children":[]},{"title":"Create from the CLI","slug":"create-from-the-cli","depth":3,"children":[]}]},{"title":"Configure triggers","slug":"configure-triggers","depth":2,"children":[{"title":"Add a schedule trigger","slug":"add-a-schedule-trigger","depth":3,"children":[]},{"title":"Schedule a one-off run","slug":"schedule-a-one-off-run","depth":4,"children":[]},{"title":"Add an API trigger","slug":"add-an-api-trigger","depth":3,"children":[]},{"title":"Trigger a scheduled task","slug":"trigger-a-scheduled-task","depth":4,"children":[]},{"title":"API reference","slug":"api-reference","depth":4,"children":[]},{"title":"Add a GitHub trigger","slug":"add-a-github-trigger","depth":3,"children":[]},{"title":"Supported events","slug":"supported-events","depth":4,"children":[]},{"title":"Filter pull requests","slug":"filter-pull-requests","depth":4,"children":[]}]},{"title":"Manage scheduled tasks","slug":"manage-scheduled-tasks","depth":2,"children":[{"title":"View and interact with runs","slug":"view-and-interact-with-runs","depth":3,"children":[]},{"title":"Edit and control scheduled tasks","slug":"edit-and-control-scheduled-tasks","depth":3,"children":[]},{"title":"Manage scheduled tasks from the CLI","slug":"manage-scheduled-tasks-from-the-cli","depth":3,"children":[]},{"title":"Repositories and branch permissions","slug":"repositories-and-branch-permissions","depth":3,"children":[]},{"title":"Connectors","slug":"connectors","depth":3,"children":[]},{"title":"Permission prompts during a run","slug":"permission-prompts-during-a-run","depth":3,"children":[]},{"title":"When a run publishes an artifact without asking","slug":"when-a-run-publishes-an-artifact-without-asking","depth":3,"children":[]},{"title":"Artifacts in Accept edits mode","slug":"artifacts-in-accept-edits-mode","depth":4,"children":[]},{"title":"Environments and network access","slug":"environments-and-network-access","depth":3,"children":[]}]},{"title":"Usage and limits","slug":"usage-and-limits","depth":2,"children":[]},{"title":"Where the name routines still appears","slug":"where-the-name-routines-still-appears","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[{"title":"/schedule returns “Unknown command”","slug":"schedule-returns-unknown-command","depth":3,"children":[]},{"title":"“Routines are disabled by your organization’s policy”","slug":"routines-are-disabled-by-your-organizations-policy","depth":3,"children":[]},{"title":"“The last run” warnings","slug":"the-last-run-didnt-start","depth":3,"children":[]}]},{"title":"Related resources","slug":"related-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/claude-code/f164a83c5609d421/consent-loader.js","/docs/_mintlify/custom/claude-code/a14b5f5366e4b482/antalytics-loader.js","/docs/_mintlify/custom/claude-code/4cd6fefc4e377e79/toc-collapse.js","/docs/_mintlify/custom/claude-code/f6b3e97e7cbfc8d3/settings-anchor-redirect.js","/docs/_mintlify/custom/claude-code/45be325883f4820b/plugins-anchor-redirect.js","/docs/_mintlify/custom/claude-code/7c53cb088b8331b3/nav-tab-click.js"],"subdomain":"claude-code","siteName":"Claude Code Docs","title":"Automate work with scheduled tasks - Claude Code Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/routines","matchLevel":0},"fr":{"href":"/fr/routines","matchLevel":1},"de":{"href":"/de/routines","matchLevel":1},"it":{"href":"/it/routines","matchLevel":1},"jp":{"href":"/ja/routines","matchLevel":1},"es":{"href":"/es/routines","matchLevel":1},"ko":{"href":"/ko/routines","matchLevel":1},"zh-CN":{"href":"/zh-CN/routines","matchLevel":1},"zh-TW":{"href":"/zh-TW/routines","matchLevel":1},"ru":{"href":"/ru/routines","matchLevel":1},"id":{"href":"/id/routines","matchLevel":1},"pt-BR":{"href":"/pt/routines","matchLevel":1}}},"lastModified":"2026-10-27T19:25:38.850Z","originalFileLocation":"en/routines.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Claude Code Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Automate work with scheduled tasks - Claude Code Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Claude Code Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://code.claude.com/docs/en/routines\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://claude-code.mintlify.app/_mintlify/api/og/v2?division=Claude+Code+in+the+cloud\u0026amp;title=Automate+work+with+scheduled+tasks\u0026amp;description=Put+Claude+Code+on+autopilot.+Create+scheduled+tasks%2C+formerly+routines%2C+that+run+in+the+cloud+on+a+schedule%2C+on+API+calls%2C+or+on+GitHub+events.\u0026amp;theme=8d9812df31da293aba4e8103\u0026amp;signature=0314f729087b3eabd938dca95d84fee41d3f8b96ee337d1118528ac9b5cc0cf6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Automate work with scheduled tasks - Claude Code Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://claude-code.mintlify.app/_mintlify/api/og/v2?division=Claude+Code+in+the+cloud\u0026amp;title=Automate+work+with+scheduled+tasks\u0026amp;description=Put+Claude+Code+on+autopilot.+Create+scheduled+tasks%2C+formerly+routines%2C+that+run+in+the+cloud+on+a+schedule%2C+on+API+calls%2C+or+on+GitHub+events.\u0026amp;theme=8d9812df31da293aba4e8103\u0026amp;signature=0314f729087b3eabd938dca95d84fee41d3f8b96ee337d1118528ac9b5cc0cf6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/claude-code/pLsy-mRpNksna2sx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Claude Code Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0E0E0E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://code.claude.com/docs/en/routines\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/en/routines.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://code.claude.com/docs/en/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://code.claude.com/docs/fr/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://code.claude.com/docs/de/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://code.claude.com/docs/it/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://code.claude.com/docs/ja/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://code.claude.com/docs/es/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://code.claude.com/docs/ko/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-CN\" href=\"https://code.claude.com/docs/zh-CN/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-TW\" href=\"https://code.claude.com/docs/zh-TW/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://code.claude.com/docs/ru/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"id\" href=\"https://code.claude.com/docs/id/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://code.claude.com/docs/pt/routines\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://code.claude.com/docs/en/routines\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://code.claude.com/#organization\",\"name\":\"Claude Code Docs\",\"url\":\"https://code.claude.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/claude-code/c5r9_6tjPMzFdDDT/logo/light.svg?fit=max\u0026auto=format\u0026n=c5r9_6tjPMzFdDDT\u0026q=85\u0026s=78fd01ff4f4340295a4f66e2ea54903c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://code.claude.com/docs#website\",\"name\":\"Claude Code Docs\",\"url\":\"https://code.claude.com/docs\",\"publisher\":{\"@id\":\"https://code.claude.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://code.claude.com/docs/en/routines#webpage\",\"url\":\"https://code.claude.com/docs/en/routines\",\"name\":\"Automate work with scheduled tasks\",\"description\":\"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.\",\"dateModified\":\"2026-10-27T19:25:38.850Z\",\"isPartOf\":{\"@id\":\"https://code.claude.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://code.claude.com/docs/en/routines#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://code.claude.com/docs/en/routines#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platforms and integrations\",\"item\":\"https://code.claude.com/docs/en/platforms\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Claude Code in the cloud\",\"item\":\"https://code.claude.com/docs/en/web-quickstart\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Automate work with scheduled tasks\",\"item\":\"https://code.claude.com/docs/en/routines\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://code.claude.com/docs/en/routines#article\",\"headline\":\"Automate work with scheduled tasks\",\"name\":\"Automate work with scheduled tasks\",\"description\":\"Put Claude Code on autopilot. Create scheduled tasks, formerly routines, that run in the cloud on a schedule, on API calls, or on GitHub events.\",\"url\":\"https://code.claude.com/docs/en/routines\",\"mainEntityOfPage\":{\"@id\":\"https://code.claude.com/docs/en/routines#webpage\"},\"dateModified\":\"2026-10-27T19:25:38.850Z\",\"keywords\":\"/schedule, schedule, scheduled task, routine, routines, /routines, cloud cron, remote schedule, trigger\",\"publisher\":{\"@id\":\"https://code.claude.com/#organization\"},\"isPartOf\":{\"@id\":\"https://code.claude.com/docs#website\"}}]}\u003c/script>","siteName":"Claude Code Docs","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Getting started","menu":[{"item":"Overview","description":"What Claude Code is and how to install it","groups":[{"group":"Getting started","pages":[{"sidebarTitle":"Overview","title":"Overview","href":"/en/overview"},{"title":"Quickstart","href":"/en/quickstart"},{"title":"Claude Code changelog","sidebarTitle":"Changelog","href":"/en/changelog"}]},{"group":"Core concepts","pages":[{"title":"How Claude Code works","href":"/en/how-claude-code-works"},{"title":"Extend Claude Code","sidebarTitle":"Extend Claude Code","href":"/en/features-overview"},{"title":"Explore the .claude directory","mode":"wide","href":"/en/claude-directory"},{"title":"Explore the context window","mode":"wide","href":"/en/context-window"},{"sidebarTitle":"Prompt caching","title":"How Claude Code uses prompt caching","href":"/en/prompt-caching"}]},{"group":"Use Claude Code","pages":[{"sidebarTitle":"Store instructions and memories","title":"How Claude remembers your project","href":"/en/memory"},{"title":"Manage sessions","href":"/en/sessions"},{"title":"Common workflows","href":"/en/common-workflows"},{"title":"Prompt library","sidebarTitle":"Prompt library","href":"/en/prompt-library"},{"title":"Best practices for Claude Code","sidebarTitle":"Best practices","href":"/en/best-practices"}]},{"group":"Platforms and integrations","pages":[{"title":"Platforms and integrations","sidebarTitle":"Overview","href":"/en/platforms"},{"title":"Continue local sessions from any device with Remote Control","sidebarTitle":"Remote Control","href":"/en/remote-control"},{"group":"Claude Code in the cloud","pages":[{"title":"Get started with Claude Code in the cloud","sidebarTitle":"Get started","href":"/en/web-quickstart"},{"title":"Use Claude Code in the cloud","sidebarTitle":"Cloud sessions","description":"Run Claude Code sessions in the cloud from your browser, phone, Desktop app, or terminal, move them with `--cloud` and `--teleport`, and auto-fix pull requests.","href":"/en/claude-code-on-the-web"},{"title":"Automate work with scheduled tasks","sidebarTitle":"Cloud scheduled tasks","href":"/en/routines"}]},{"title":"Let Claude coordinate ongoing work with Projects","sidebarTitle":"Projects","description":"Hand Claude a stream of related tasks in one conversation and let it run them as parallel cloud sessions that share repositories, instructions, and memory.","href":"/en/claude-projects"},{"group":"Claude Code on desktop","pages":[{"title":"Get started with the desktop app","sidebarTitle":"Get started","href":"/en/desktop-quickstart"},{"title":"Desktop application","sidebarTitle":"Reference","href":"/en/desktop"},{"title":"Claude Desktop on Linux (beta)","sidebarTitle":"Linux (beta)","href":"/en/desktop-linux"},{"title":"Claude Code Desktop in WSL","sidebarTitle":"Windows (WSL)","href":"/en/desktop-wsl"},{"title":"Schedule recurring tasks in Claude Code Desktop","sidebarTitle":"Scheduled tasks","href":"/en/desktop-scheduled-tasks"},{"title":"Test iOS apps in the simulator","sidebarTitle":"iOS simulator (beta)","href":"/en/desktop-ios-simulator"}]},{"title":"Claude Code on mobile","sidebarTitle":"Mobile","href":"/en/mobile"},{"title":"Use Claude Code with Chrome","sidebarTitle":"Chrome extension","href":"/en/chrome"},{"title":"Let Claude use your computer from the CLI","sidebarTitle":"Computer use (preview)","href":"/en/computer-use"},{"title":"Use Claude Code in VS Code","sidebarTitle":"Visual Studio Code","href":"/en/vs-code"},{"title":"JetBrains IDEs","href":"/en/jetbrains"},{"title":"Claude Code in Slack","href":"/en/slack"},{"title":"Claude Tag","url":"https://claude.com/docs/claude-tag","href":"/en/claude-tag"}]},{"group":"Code review and pull requests","pages":[{"group":"Code Review","pages":[{"title":"Code Review","sidebarTitle":"Overview","href":"/en/code-review"},{"title":"Set up Code Review","sidebarTitle":"Set up Code Review","href":"/en/code-review-setup"},{"title":"Customize Code Review","sidebarTitle":"Customize reviews","href":"/en/code-review-customize"},{"title":"Read and request reviews on a pull request","sidebarTitle":"Read and request reviews","href":"/en/code-review-pull-requests"},{"title":"Code Review costs and usage","sidebarTitle":"Costs and usage","href":"/en/code-review-costs"},{"title":"Troubleshoot Code Review","sidebarTitle":"Troubleshooting","href":"/en/code-review-troubleshooting"}]},{"title":"Review locally with /code-review","sidebarTitle":"Review code locally","href":"/en/code-review-local"},{"title":"Find bugs with ultrareview","sidebarTitle":"Ultrareview","href":"/en/ultrareview"},{"group":"Security scans","pages":[{"title":"Catch security issues as Claude writes code","sidebarTitle":"Security guidance plugin","href":"/en/security-guidance"},{"title":"Scan your codebase for vulnerabilities","sidebarTitle":"Claude Security plugin","href":"/en/claude-security"}]},{"group":"Run Claude in your own CI","pages":[{"title":"Claude Code GitHub Actions","sidebarTitle":"GitHub Actions","href":"/en/github-actions"},{"title":"Use Claude Code GitHub Actions with cloud providers","sidebarTitle":"GitHub Actions cloud providers","href":"/en/github-actions-cloud-providers"},{"title":"Claude Code GitLab CI/CD","sidebarTitle":"GitLab CI/CD","href":"/en/gitlab-ci-cd"}]},{"title":"Claude Code with GitHub Enterprise Server","sidebarTitle":"GitHub Enterprise Server","href":"/en/github-enterprise-server"}]}]},{"item":"Quickstart","description":"Install, start a session, make your first change","pages":[{"title":"Quickstart","href":"/en/quickstart"}]},{"item":"Core concepts","description":"How it works, what loads, what it costs","pages":[{"title":"Core concepts","href":"/en/how-claude-code-works"}]},{"item":"Use Claude Code","description":"Memory, sessions, workflows, and prompts","pages":[{"title":"Use Claude Code","href":"/en/memory"}]},{"item":"Platforms and integrations","description":"Terminal, IDEs, desktop, web, and Slack","pages":[{"title":"Platforms and integrations","href":"/en/platforms"}]},{"item":"Code review and pull requests","description":"PR reviews, local review, security, and CI","pages":[{"title":"Code review and pull requests","href":"/en/code-review"}]}]},{"tab":"Build with Claude Code","menu":[{"item":"Agents and parallel work","description":"Subagents, agent view, teams, worktrees","pages":[{"title":"Agents and parallel work","href":"/en/agents"}]},{"item":"MCP","description":"Connect your tools and data","pages":[{"title":"MCP","href":"/en/mcp-quickstart"}]},{"item":"Skills","description":"Package workflows Claude can run","pages":[{"title":"Skills","href":"/en/skills"}]},{"item":"Artifacts","description":"Publish a page from a session","pages":[{"title":"Artifacts","href":"/en/artifacts"}]},{"item":"Automation","description":"Hooks, channels, schedules, non-interactive runs","pages":[{"title":"Automation","href":"/en/hooks-guide"}]},{"item":"Guides","description":"Work in large codebases","pages":[{"title":"Guides","href":"/en/large-codebases"}]},{"item":"Troubleshooting","description":"Install, configuration, and error fixes","pages":[{"title":"Troubleshooting","href":"/en/troubleshoot-install"}]}],"pages":[{"title":"Build with Claude Code","href":"/en/agents"}]},{"tab":"Plugins","menu":[{"item":"Plugins","description":"What plugins are and what they add","pages":[{"title":"Plugins","href":"/en/plugins/overview"}]},{"item":"Use plugins","description":"Find plugins and add them","pages":[{"title":"Use plugins","href":"/en/plugins/install"}]},{"item":"Create plugins","description":"Create, test, and publish a plugin","pages":[{"title":"Create plugins","href":"/en/plugins/create"}]},{"item":"Mods","description":"Change the Claude Code interface","pages":[{"title":"Mods","href":"/en/plugins/mods/overview"}]},{"item":"Run a marketplace","description":"Host and share plugins","pages":[{"title":"Run a marketplace","href":"/en/plugins/create-marketplace"}]},{"item":"Manage plugins for your organization","description":"Control plugins across a team","pages":[{"title":"Manage plugins for your organization","href":"/en/plugins/org"}]},{"item":"Troubleshooting","description":"Install and loading problems","pages":[{"title":"Troubleshooting","href":"/en/plugins/troubleshooting"}]},{"item":"Reference","description":"Manifests, CLI, and marketplace schema","pages":[{"title":"Reference","href":"/en/plugins/manifest-reference"}]}],"pages":[{"title":"Plugins","href":"/en/plugins/overview"}]},{"tab":"Administration","menu":[{"item":"Setup and access","description":"Install, sign-in, and managed settings","pages":[{"title":"Setup and access","href":"/en/admin-setup"}]},{"item":"Deployment","description":"Cloud providers, network, containers","pages":[{"title":"Deployment","href":"/en/third-party-integrations"}]},{"item":"Gateways","description":"Route requests through a gateway","pages":[{"title":"Gateways","href":"/en/gateways"}]},{"item":"Usage and costs","description":"Monitoring, spend, and analytics","pages":[{"title":"Usage and costs","href":"/en/monitoring-usage"}]},{"item":"Security and data","description":"Security, data use, and retention","pages":[{"title":"Security and data","href":"/en/security"}]},{"item":"Adoption","description":"Kits for rolling out to a team","pages":[{"title":"Adoption","href":"/en/communications-kit"}]}],"pages":[{"title":"Administration","href":"/en/admin-setup"}]},{"tab":"Configuration","menu":[{"item":"Settings","description":"Files, precedence, and keys","pages":[{"title":"Settings","href":"/en/settings"}]},{"item":"Permissions and sandboxing","description":"What Claude Code can do without asking","pages":[{"title":"Permissions and sandboxing","href":"/en/permissions"}]},{"item":"Environments","description":"Cloud and self-hosted environments","pages":[{"title":"Environments","href":"/en/cloud-environments"}]},{"item":"Model and responses","description":"Models, effort, and output styles","pages":[{"title":"Model and responses","href":"/en/model-config"}]},{"item":"Interface","description":"Terminal, keys, voice, and status line","pages":[{"title":"Interface","href":"/en/terminal-config"}]}],"pages":[{"title":"Configuration","href":"/en/settings"}]},{"tab":"Reference","menu":[{"item":"Reference","description":"Commands, flags, tools, hooks, and variables","pages":[{"title":"Reference","href":"/en/cli-reference"}]},{"item":"Glossary","description":"Terms used across the docs","pages":[{"title":"Glossary","href":"/en/glossary"}]}],"pages":[{"title":"Reference","href":"/en/cli-reference"}]},{"tab":"Agent SDK","menu":[{"item":"Agent SDK","description":"Overview, quickstart, and migration","pages":[{"title":"Agent SDK","href":"/en/agent-sdk/overview"}]},{"item":"Build agents","description":"Configuration and examples","pages":[{"title":"Build agents","href":"/en/agent-sdk/configuration"}]},{"item":"Core concepts","description":"The agent loop, features, and sessions","pages":[{"title":"Core concepts","href":"/en/agent-sdk/agent-loop"}]},{"item":"Input and output","description":"Streaming, user input, structured output","pages":[{"title":"Input and output","href":"/en/agent-sdk/streaming-vs-single-mode"}]},{"item":"Extend with tools","description":"Custom tools, MCP, and subagents","pages":[{"title":"Extend with tools","href":"/en/agent-sdk/custom-tools"}]},{"item":"Customize behavior","description":"System prompts, skills, and plugins","pages":[{"title":"Customize behavior","href":"/en/agent-sdk/modifying-system-prompts"}]},{"item":"Control and observability","description":"Permissions, hooks, cost, and tracing","pages":[{"title":"Control and observability","href":"/en/agent-sdk/permissions"}]},{"item":"Deployment","description":"Hosting and secure deployment","pages":[{"title":"Deployment","href":"/en/agent-sdk/hosting"}]},{"item":"SDK references","description":"TypeScript and Python","pages":[{"title":"SDK references","href":"/en/agent-sdk/typescript"}]}],"pages":[{"title":"Agent SDK","href":"/en/agent-sdk/overview"}]},{"tab":"What's New","pages":[{"title":"What's New","href":"/en/whats-new"}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/en/legal-and-compliance"}]}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/routines"}]},{"language":"de","pages":[{"title":"de","href":"/de/routines"}]},{"language":"it","pages":[{"title":"it","href":"/it/routines"}]},{"language":"jp","pages":[{"title":"jp","href":"/ja/routines"}]},{"language":"es","pages":[{"title":"es","href":"/es/routines"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/routines"}]},{"language":"zh-CN","pages":[{"title":"zh-CN","href":"/zh-CN/routines"}]},{"language":"zh-TW","pages":[{"title":"zh-TW","href":"/zh-TW/routines"}]},{"language":"ru","pages":[{"title":"ru","href":"/ru/routines"}]},{"language":"id","pages":[{"title":"id","href":"/id/routines"}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt/routines"}]}]},"title":"Automate work with scheduled tasks - Claude Code Docs","buildId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","deploymentId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","dynamics":[],"chunks":[]}