Running Claude Code on a schedule: cost caps, tool allow-lists, and shell pitfalls
A developer writing for the Keelwork account explains how to run Claude Code unattended using print mode from cron, launchd, systemd, or CI. Because no one is present to approve risky actions, the author stresses restricting the agent with a strict tool allow-list, a spending cap, and deny rules. The article includes a sample command that limits the agent to read-only tools and writing to a reports folder. It also provides a POSIX shell lock script to prevent overlapping runs, along with notes on stale locks, scheduler choices, and minimal PATH issues. The author cautions that the setup does not sandbox the agent, which still runs with the user's permissions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in