HOW-TO GUIDE

How to run a Claude Code task in the cloud on a schedule or a GitHub event

Based on a guide by Anthropic on the Claude Code Docs · Nov 20, 2026

You'll end with: A saved Claude Code task with a prompt, repositories, and connectors that runs on a schedule, an API call, or a GitHub event.

Why it's worth having: Runs happen on Anthropic's cloud or your own self-hosted environment, so a nightly check keeps going with your laptop closed.

At a glance

WHO IT'S FOR
Engineers and analysts who keep scripts, reports, or checks in a GitHub repository.
LEVEL
Intermediate
COST
On Pro, Max, Ultra, Team, and Enterprise plans, as a research preview.
YOU NEED
A paid Claude plan · Claude Code · A GitHub repository · The connectors the task needs

The method, in short

  1. 1Write the prompt once, and pick the repositories and connectors the task can use.
  2. 2Create the task at claude.ai/code/routines, or from the Claude Code CLI with /schedule.
  3. 3Attach a trigger: a recurring schedule, an API call to the task's endpoint, or a matching GitHub event.
  4. 4Review each run's results and adjust the prompt before you widen what the task can touch.

Scheduled tasks, formerly routines, are a research preview, so behavior, limits, and the API can change.