All resources
Guide/8 min read

Scheduled Claude Code tasks: /loop, cloud routines, and automations

Published October 6, 2026

Summary

Schedule Claude Code for a weekly documentation check or a short CI watch. Choose between /loop, local Desktop tasks, Anthropic cloud routines, and Replicas automations based on what must stay running and what the agent needs to access.

Decision

Which Claude Code scheduler should you use?

Start with the job: does it need your uncommitted files, or should it run while your laptop is closed? A five-minute CI watch and a weekly repository audit need different schedulers. Checked October 6, 2026. Replicas publishes this guide and is one of the options below.

OptionLaptop can be off?Use it forSetup requirement
/loopNo, when running locallyPolling during an active sessionA running Claude Code session
Desktop local taskNoRecurring work on local files and toolsYour machine and Claude Desktop running
Anthropic cloud routineYesScheduled repository work in Claude CodeClaude account, repository, cloud environment
Replicas automationYesTeam maintenance in configured cloud workspacesReplicas environment, repository, Claude Code credentials

Official scheduling comparison

Anthropic separates session loops, Desktop tasks, and cloud routines. A session loop is useful for a short watch; it is not a replacement for a durable weekly schedule.

During a session

Use /loop for a short CI watch

In an existing Claude Code session, enter: /loop 5m check the CI status of PR 123 and report any new failures; do not push changes or merge it.

Use an explicit interval and prompt so the watch has a clear scope. Ask Claude to list scheduled tasks and cancel the job when you finish.

  • Local loops need Claude Code running. They do not execute while the computer sleeps.
  • Recurring session tasks expire seven days after creation. With claude --resume or claude --continue, tasks created with CronCreate are restored unless expired or a one-shot task’s scheduled time has passed. Self-paced loops must be restarted.
  • Busy sessions do not replay every missed interval. Use a CI event trigger when you need to respond to each failure.

Without your laptop

Set up a weekly Anthropic cloud routine

Choose this path if you want hosted Claude Code scheduling with your Claude account. Routines are a research preview on Pro, Max, Team, and Enterprise. Runs use your account’s plan limits; the minimum recurring interval is one hour. Check the linked documentation for current availability and limits.

Create a routine in Claude Code

Open claude.ai/code/routines, choose New routine, name the job, and paste a self-contained prompt. Select the repository and a cloud environment with the dependencies and network access the job needs. Add a weekly schedule and check its timezone. Remove connectors the job does not need.

Save it, then use Run now. Inspect the resulting session and changes before relying on the schedule. Each run starts from a fresh clone rather than your local working tree. You can also create a scheduled routine conversationally with /schedule in a supported CLI version.

Weekly maintenance

Example: a documentation-drift check

Start with one repository and a weekly schedule. Replace the paths and test command to match your repository.

Task prompt
Inspect commits merged to the default branch in the last seven days. Compare changes to public APIs and configuration with docs/ and README.md. Fix only documentation you can prove is stale from the code. Do not modify runtime code, add features, publish, or merge. Before creating a branch, look for an open PR for the same correction and skip duplicates. If no correction is needed, return a short no-change report. Otherwise run the repository documentation checks, open one draft PR, and include the source commit, changed paths, check results, and anything you could not verify.
Environment setup
Provide repository access, the documentation build tools, and the exact check command in the repository instructions. Keep the initial job limited to committed code and docs so it does not depend on another session’s memory.
Acceptance check
Run it manually against a known documentation mismatch. Confirm the diff fixes that mismatch, the checks actually ran, and the output links the source commit. Run it again to check that the existing draft PR prevents another duplicate.
  • A successful scheduler fire is not evidence that the documentation check succeeded. Read the run output and checks.
  • Review the first few runs before expanding the prompt to more repositories or enabling writes to other systems.

Team workflow

Run the same job with a Replicas automation

Use Replicas when your team wants the job in its configured agent environments and a workspace it can inspect and steer. Compare the platform plan and agent usage costs before choosing; a hosted schedule alone may already meet your needs.

Configure the automation

Create an automation with the prompt above, select the repository and environment, and explicitly choose Claude Code under the agent overrides. Add a weekly schedule, check the displayed timezone, and use a new workspace each run for this repository audit. Choose sleep or archive when done so the workspace does not stay active unnecessarily.

Trigger a manual run and inspect its workspace, diff, and check output. Replicas schedules have a minimum recurring interval of 60 minutes. Use a GitHub event trigger for PR activity instead of trying to reproduce a five-minute /loop schedule.

Before you rely on it

When a scheduled task does not produce useful work

Separate the trigger, environment, and task outcome. A run can start on time but fail because dependencies, repository access, or a required connector are missing.

Nothing starts
Check that the schedule is enabled and its timezone matches your expectation. For local work, confirm the machine and required app or session are still running.
Run starts but cannot check docs
Read the command output. Confirm setup installed the documentation tools and that credentials and network access cover the repository and any required services.
Repeated PRs or broad changes
Narrow the prompt to one repository and one kind of correction. Require an existing-PR check and a no-change result when there is no proven mismatch.
Usage grows without useful changes
Reduce the frequency, pause the schedule while debugging, and inspect completed runs. Review platform and inference usage separately where they are billed separately.

FAQ

Scheduled Claude Code tasks: common questions