OpenClaw Automation
Schedule tasks, orchestrate subagents, and build overnight processing pipelines. Real builders run 20+ cron jobs generating content, reviewing code, and managing businesses while they sleep.
Cron Jobs
OpenClaw cron jobs let you schedule any agent task to run automatically. Each job gets its own isolated session, can use a different AI model, and delivers results directly to your messaging channels.
Cron Job Configuration
# Example cron configuration
cron:
- name: "nightly-build"
schedule: "0 2 * * *" # 2 AM daily
prompt: "Run npm build on all projects, fix any errors, commit fixes"
model: "anthropic/claude-sonnet-4-20250514"
thinking: "high"
channel: "telegram"
- name: "morning-briefing"
schedule: "0 8 * * 1-5" # 8 AM weekdays
prompt: "Check email, calendar, and project status. Send me a morning briefing."
model: "anthropic/claude-sonnet-4-20250514"
- name: "weekly-content"
schedule: "0 3 * * 0" # 3 AM Sunday
prompt: "Generate 5 blog post drafts based on trending AI topics"
model: "anthropic/claude-opus-4-6"
thinking: "high"Standard cron syntax. Each job runs independently with its own model and thinking level.
Common Cron Patterns
0 * * * *Every hour0 2 * * *Daily at 2 AM0 8 * * 1-5Weekdays at 8 AM0 3 * * 0Sundays at 3 AM*/30 * * * *Every 30 minutesCron vs Heartbeat
- • Cron: Exact timing, isolated session, heavy tasks
- • Heartbeat: Approximate timing, shared context, light checks
- • Rule: If it needs a specific time → cron. If it can drift → heartbeat
Subagent Orchestration
How Subagents Work
🎯 Main Agent (Orchestrator)
Plans, delegates, coordinates. Never does work directly.
Subagent A
Build feature X
Subagent B
Research competitors
Subagent C
Write content
Parallel Execution
Run multiple subagents simultaneously. While one builds a feature, another researches, and a third writes documentation. Results flow back to the orchestrator automatically.
Cost-Efficient Delegation
Use an expensive model (Opus) for the orchestrator and cheaper models (Sonnet, Haiku) for subagents. The orchestrator thinks strategically; subagents execute tactically.
Real Example: 22-Cron-Job Production System
A Real Builder's Cron Schedule
This is a real production system running 22 cron jobs across content generation, monitoring, and business operations. Total daily cost: ~$8-12 using model splitting.
🌅 Morning (6-9 AM)
- • Weather briefing → Telegram
- • Email digest → Telegram
- • Calendar preview → Telegram
- • GitHub PR review queue → Telegram
🌙 Overnight (12-6 AM)
- • Content generation (5 articles) using Opus + thinking
- • SEO audit on top 50 pages
- • Link checker across all sites
- • Database backup verification
- • Dependency update check
- • Security scan + report
📊 Business (Various)
- • Hourly: Analytics check + anomaly detection
- • Daily: Revenue report compilation
- • Weekly: Competitor analysis
- • Weekly: Newsletter draft generation
- • Monthly: Performance summary + insights
🔧 Infrastructure
- • Every 6h: Health check on all services
- • Daily: SSL certificate expiry check
- • Daily: Memory file maintenance + MEMORY.md update
- • Weekly: Log rotation + cleanup
💰 Cost Breakdown
16 jobs × ~$0.15 = ~$2.40/day
4 jobs × ~$1.50 = ~$6.00/day
2 jobs × ~$0.50 = ~$1.00/day
Total: ~$9.40/day ($282/month) for 22 automated jobs running 24/7
Overnight Builds
One of OpenClaw's most powerful patterns: schedule heavy work for overnight and wake up to completed tasks. Content generation, code reviews, data processing — all done while you sleep.
Overnight Build Example
# overnight-content-build.yaml
name: "overnight-content"
schedule: "0 1 * * *" # 1 AM nightly
model: "anthropic/claude-opus-4-6"
thinking: "high"
prompt: |
Build tonight's content batch:
1. Check content-queue.md for pending topics
2. Generate 3 full articles (2000+ words each)
3. Create SEO metadata for each
4. Run quality checks
5. Stage for review in drafts/
6. Update content-queue.md with completion status
7. Send summary to TelegramThis single cron job produces 3 publication-ready articles every night. At ~$3/run, that's $1/article for high-quality AI content — less than 1% of the cost of human writers.
Automate Like the Pros
Get cron templates, automation patterns, and real production examples from builders running 20+ automated jobs.
Automation FAQ
What can OpenClaw cron jobs do?
Anything an agent can do manually — code builds, content generation, monitoring, reports, data processing, and more. Each job runs in its own isolated session with configurable models.
How do subagents work?
A main agent spawns child agents to handle specific tasks in parallel. The orchestrator plans and delegates; subagents execute. Results auto-announce back for coordination.
Can OpenClaw work while I sleep?
Absolutely. Overnight cron jobs are one of OpenClaw's killer features. Schedule heavy work for the early hours and wake up to completed content, code reviews, and reports.
How many cron jobs can I run?
No hard limit. Production systems commonly run 15-25 jobs. A 22-job system costs about $9-12/day with model splitting. Start with 3-5 jobs and scale based on results.
Build Your Automation Empire
Start with one cron job. Scale to twenty. Wake up to completed work every morning.