How do you run agents on a schedule, unattended?
16 posts
Playbook
Practitioners run unattended agents using cron or launchd to trigger workflows on local hardware or cloud environments.
- Configure launchd for stability
When using launchd, set a specific WorkingDirectory to avoid walking the disk, use a fixed binary path, and set DISABLE_AUTOUPDATER=1 to prevent permission identity changes [1, 3]. 13
- Implement job idempotency and status checks
To handle duplicate triggers, scripts should check for an existing completion marker and exit early if the task is done [4, 10]. 410
- Manage task execution and timeouts
Divide long tasks into segments with specific timeouts, such as 1500 seconds, and use markers to allow rerunning only failed steps . 10
- Optimize GitHub Actions workflows
Run agents on GitHub Actions cron with concurrency groups to prevent multiple agents from editing the same files, and use separate steps to validate files before committing . 2
- Control costs with pre-LLM filtering
Before hitting the LLM, use a low-latency classifier to filter, deduplicate, and score content as hype, fact, or signal . 5
- Enable fully autonomous long-running sessions
Use auto mode to bypass approval requests and run on cloud Claude Code so tasks continue after closing a laptop . 9
Choosing between approaches
GitHub Actions cron scheduling can be delayed, so practitioners are advised to avoid scheduling at the top of the hour 2.
Not covered yet
The material does not cover how to handle security credentials or secrets specifically for these automated schedules.
Posts
- Fix a nightly claude -p launchd job: set PATH, WorkingDirectory and --allowedToolsThe author had launchd read commits from four repos each night and write a morning report; of 14 nights, 6 ran on time, 2 were late and 6 failed.

- Run Claude on a GitHub Actions cron with validated commits and concurrency groupsThe author gives a full workflow: claude-code-action runs /daily-standup with max-turns and allowed tools limited, a separate script step validates files before committing, failures retry with pull --rebase, and a concurrency group stops two agents editing the same files.

- Run claude -p from launchd with an empty working directory and a pinned binary pathRunning claude -p on a schedule through launchd, the author found that starting from / made it walk the whole disk and trigger repeated privacy permission prompts, and the self-updater made each version a new permission identity.
- Pin links and commands in the prompt, check for duplicates, then curl for a 200The author runs claude -p under launchd on a Mac mini to publish a post each day.

- Filter first with a Jev classifier in a news agent triggered every minute by cronIndyDevDan built a news agent on Pi Durable and the open-source pi agent harness, deployed on an M4 Mac mini or an exe.dev sandbox and triggered every minute by cron.

- Run Pi with a local Qwen 3.6 35B to answer Zendesk tickets unattendedThe author built an assistant on the Pi framework with Qwen 3.6 35B running in LM Studio that reads new Zendesk tickets and sends replies.

- Have Codex wake every 5 minutes to maintain your repos and hand work to threadsPeter Steinberger tells Codex to maintain his repos, wake up every 5 minutes and direct work to threads, which makes work easy to parallelize and steer as needed.

- Add time-sensitive deals to a cart in 51 seconds with Claude Codeares.

- Five settings for running Opus autonomously for hours or daysBoris Cherny gives five tips for letting Opus run for hours or days: use auto mode so it needs no approvals; use dynamic workflows to orchestrate hundreds or thousands of agents; push it to finish with /goal or /loop; run on cloud Claude Code so closing the laptop is fine; and set up end-to-end self-verification per surface for web, mobile and backend.
- Fire a launchd job in four time slots and exit early once a done marker existsThe author has Claude Code update an Obsidian vault daily, and sleep, lost network or timeouts often interrupted it.

- Run Claude Code as a remote agent on AgentCore: isolated sessions, three tries, a PR back
- Run 104 launchd jobs on an 8 GB Mac mini with watchdog and janitor jobs
- Keep daemons in launchd and run finish-and-exit jobs as Claude Code scheduled tasks
6 more posts to see