Updated · Markdown

Run Claude Code on a schedule, in the background

Updated 2026-11-29. Written by the team that builds Tex, so weigh it accordingly.

Short answer: Claude Code runs without a person in its headless mode (claude -p "..."), so anything that runs a command on a schedule can run it: cron on a server, a scheduled CI job, or a hosted agent platform. The work is in what surrounds it: a sandbox, credentials, a cap on spend, a record of what it did, and a way to keep what it learned for the next run.

Three ways

Cron on a server. Install Claude Code, set an API key, and run claude -p from crontab with the tools it may use. Cheapest to start. You own the box, its secrets, its logs and what it can reach.

A scheduled CI job. GitHub Actions can run Claude Code on a schedule: trigger, and Anthropic publishes claude-code-action for repo work. Good for jobs about one repo. CI jobs have time limits and start from a clean checkout each time.

A hosted platform such as Tex. You define an agent once, with its instructions, model, tools, knowledge base and a schedule trigger (cron, in UTC). Tex starts each run in its own microVM with real Claude Code inside, or Codex for OpenAI models.

What Tex adds around Claude Code

Questions people ask

Is it really Claude Code? Yes. The sandbox image runs the Claude Code CLI itself, calling the model through Tex's proxy.

Can I use my own Anthropic key? Yes. An organization's own Anthropic or OpenAI key wins. Without one, Tex's key is billed to your credit at the provider's list price plus 15%.

What does a run cost? On our own account in November 2026, a weekly competitor watch run on Claude Sonnet with web search cost $0.52 and took 49 seconds. Run minutes are $0.01 each.

What Tex doesn't do

Try Tex with $10 of free credit