LaunchAgent, cron, Codex, and Claude can all run something at 10am every Monday. That is about where the similarity ends. Some execute a command on your Mac. Others give an AI a prompt and let it work out what to do.
Quick comparison · These tools solve different problems
LaunchAgent and cron run commands. Codex and Claude Scheduled Tasks run prompts. A Claude Code Routine handles repository automation in the cloud.
| Option | Runs on | Computer needed? | Uses AI? | Best fit |
|---|---|---|---|---|
| macOS LaunchAgent | Your Mac | Yes | No | Local scripts, services, backups, sync, maintenance |
| Cron | Your Mac or server | Yes | No | Simple legacy command schedules |
| Codex Automation | Codex, with local or connected context | Usually for local work | Yes | Review, diagnosis, reports, and work that needs judgment |
| Claude Scheduled Task | Claude Cowork cloud, or locally when required | Only for local files or apps | Yes | Briefings, research, summaries, connected tools |
| Claude Code Routine | Anthropic cloud | No | Yes | Repository work triggered by time, API, or GitHub events |
What each one is · What changes from one scheduler to another
LaunchAgent · Native macOS
Apple’s scheduler runs a command or keeps a service alive. It does exactly what the configuration says and does not consume AI usage.
- Can use local files, scripts, and credentials
- Keeps working when Codex and Claude are closed
- User LaunchAgents need the Mac powered on and logged in
Cron · Unix legacy
Cron runs commands from a time expression. Its environment is sparse, and macOS gives LaunchAgent better system integration.
- Useful for simple jobs that already run this way
- Easy to forget because it has no friendly dashboard
- LaunchAgent is the better default for new Mac jobs
Codex Automation · OpenAI agent
Codex returns on a schedule and reads the task context before it acts. It can use tools or skills, then gives you the result to review.
- Good when each run may need a different decision
- Can continue work in an existing conversation
- Local automations work best while the machine and Codex are available
Claude Scheduled Task · Claude Cowork
Claude saves a prompt and runs it on your chosen schedule. Work that runs in the cloud can continue while your computer is off.
- Good for research, reports, email, Slack, and connected tools
- Each run becomes a reviewable Cowork session
- Tasks that require local files or apps still need the computer
Claude Code Routine · Claude Code cloud
A Routine combines a prompt with its repositories, environment, and connectors. A schedule, API request, or GitHub event can start it. Anthropic runs the job in the cloud, so your laptop can be closed.
- Best for repository automation and pull-request workflows
- Starts from a cloud environment or fresh repository clone
- Does not automatically have access to arbitrary files or secrets stored only on your Mac
Decision guide · Start with what the job needs
- Is it one known local command? Use LaunchAgent. It can back up a database, sync Git, clean Docker, or update WordPress plugins.
- Does the run need interpretation? Use Codex or Claude. Ask the agent to explain failures, summarize changes, rank risks, or prepare a weekly brief.
- Must it run while your computer is off? Use a cloud task or Routine. Move the required files, repositories, connectors, and secrets into its managed environment.
- Does it react to GitHub or an API? Use a Claude Code Routine or CI. LaunchAgent and cron are time-based local tools, not cloud event systems.
- Is it a short-lived check inside an open Claude session? Use Claude Code’s local loop. It is temporary and session-scoped, not a permanent scheduler.
Recommended pattern · Let scripts execute and agents review
A script can do the repetitive part while an agent checks the result.
1. LaunchAgent does the work
Run the script on the always-on machine. Have it write a state file and logs, then add a lock so two copies cannot overlap.
2. An agent reviews the result
Have Codex or Claude read the logs, explain anything unusual, and write a short report. The agent does not need to run the original script.