selan.ai

Guide · Claude Code for a team

How do you run Claude Code on a schedule for a team?

Claude Code schedules work three ways: /loop inside an open session, a Desktop scheduled task on your own computer, and a cloud scheduled task, formerly a routine, on Anthropic's servers. A cloud task belongs to one person's claude.ai account and spends that person's usage. For a schedule the whole team shares, run claude -p from a job of your own, or a remote agent, on company accounts.

What are the ways to schedule Claude Code?

Anthropic's own comparison sets the three side by side, and a scheduled job that runs claude -p is the fourth way.

/loopDesktop taskCloud taskYour own job
Runs onYour machineYour machineAnthropic's cloud, by defaultA server or CI runner you choose
Needs the machine onYesYes, and awakeNoThat server only
Needs an open sessionYesNo, only the appNoNo
Local filesYesYesNo, a fresh cloneThat server's
Shortest interval1 minute1 hour in the form, 1 minute when Claude sets it1 hourYour scheduler's
Cron hours are inYour local timeYour local timeUTC, unless the expression starts with CRON_TZ=Your scheduler's

Anthropic's advice is a cloud task for work that must run without your machine, a Desktop task for work that needs local files and tools, and /loop for quick polling during a session. GitHub Actions with a schedule trigger is its option for CI.

How does /loop work, and when does it stop?

/loop 5m check the deploy runs that prompt every five minutes in the session you are in. Leave out the interval and Claude picks a wait between one minute and one hour after each run. Leave out the prompt and Claude runs its maintenance prompt, or your .claude/loop.md.

  • It fires only while Claude Code runs and is idle. Closing the terminal stops it, and a fire that comes due mid-turn waits for the turn to end.
  • A recurring task expires seven days after it was made. It fires one last time, then deletes itself.
  • Runs start late on purpose. A recurring task, except one every five minutes, starts up to half the gap to its next run late, and never more than 30 minutes.
  • A session holds up to 50 scheduled tasks. Ask Claude to list or cancel them.
  • CLAUDE_CODE_DISABLE_CRON=1 turns the scheduler off, /loop included, which suits a CI runner or a shared server.

Each fire sends the session's whole context again, even while you are away. Anthropic's costs page names scheduled tasks among the things that drive usage.

When does a Desktop scheduled task run?

Only while the Claude desktop app is open and the computer is awake. Desktop checks every minute and starts a fresh session a few minutes after the scheduled time.

  • A run the computer sleeps through is skipped. On wake, Desktop starts one catch-up run for the latest missed time in the last seven days, and drops the rest.
  • Each task has its own permission mode. A run waiting on a prompt waits until you answer it.
  • A run works on your folder as it is, uncommitted changes included, unless you give the task its own Git worktree.

Whose are Claude Code's cloud scheduled tasks?

One person's. A cloud task belongs to the claude.ai account that made it and is not shared with teammates. Its commits, pull requests and connector actions appear as that person, and its runs draw that person's subscription usage, as an interactive session does.

  • Plans: Pro, Max, Ultra, Team and Enterprise, from claude.ai/code/routines, the Desktop app or /schedule in the CLI. The feature is in research preview.
  • Each run starts from a fresh clone of its GitHub repositories, in auto mode by default, and pushes to a branch that starts with claude/.
  • An account starts at most 100 scheduled runs an hour. At a usage limit, further runs are refused until the reset, unless the organization turned on usage credits.
  • Team and Enterprise owners can turn cloud tasks off for everyone in Organization settings → Capabilities → Remote sessions, which also stops the existing ones.

A cloud scheduled task runs as one person and spends that person's usage.

Good to know: /schedule needs a claude.ai subscription sign-in. A session on a Console API key, a cloud provider, ANTHROPIC_AUTH_TOKEN or an apiKeyHelper does not get it, and that includes a session through a gateway that sets one of those. The web page at claude.ai/code/routines still works with a paid claude.ai account.

How does Selan run Claude Code on a schedule?

Selan is a hosted gateway that runs Claude Code and Codex on the accounts your company already pays for. It gives a schedule two places to run.

Your own cron or CI job. An owner mints an API token for the job, and the job runs selan claude -p with it:

export SELAN_TOKEN=selanct_...
selan claude -p "summarise yesterday's failed pipelines"

The token spends as itself, under its own address, so the nightly job's bill shows as the nightly job in Usage and Logs, not on whoever set it up. Give each job its own token. The setup is in running unattended.

A Reactor remote agent. An agent is a short prompt, a model, an effort and the connectors its job needs.

  • A schedule wakes it, or an event from GitLab or GitHub, a Slack reply that tags the bot, or another agent allowed to start it.
  • A run may take up to four hours on a fresh VM with Docker, Chromium and PostgreSQL 18, on a VM in your own Google Cloud, or on a runner you keep on.
  • Agents live in workspaces, where each person's role decides who may change an agent and its schedules.
  • Every run spends through your Selan gateway, so its model calls show in your spend next to everyone else's.
  • An agent remembers what it learnt on its last run, and a run can ask a person a question and carry on from the answer.

You can make an agent and its schedule from Claude Code through Selan MCP. Reactor is in early access: Selan switches it on one company at a time, and the Reactor page shows how it works.

Start for free

Free for up to three seats, and the Free plan needs no card.

When is Claude Code's own scheduling the better answer?

For one developer, usually. /loop is the quickest way to poll a deploy or babysit a pull request, and a Desktop task is the one that reaches files only your computer has. A cloud task on your own subscription needs no server at all.

A gateway is for the schedule that is the team's: it runs on company accounts, shows what it spent as itself, and sits where the team can change it, not in one person's account. Claude Code in GitHub Actions covers the CI route, and what a developer costs covers where a schedule's tokens go.

The short version

How /loop, Desktop scheduled tasks and cloud scheduled tasks run, what they need and what they cost are as Anthropic's pages on scheduled tasks, Desktop scheduled tasks, cloud scheduled tasks and costs (code.claude.com/docs/en/scheduled-tasks, /desktop-scheduled-tasks, /routines and /costs) stated them on 23 November 2026. Cloud scheduled tasks are in research preview, so check the date before relying on their limits. What Selan does is as its command line, gateway and Reactor stated it then.