How to Set Up OpenClaw Cron Automation for Daily Tasks: Complete Guide
I wanted my AI agents to work while I slept. Every morning, I’d log in to check overnight activity, see what tasks had completed, and review the results. But that meant I still had to be involved every single day.
What I really wanted was for my agents to run automatically, do the work, and deliver the results to me without me touching anything.
That’s when I discovered OpenClaw’s cron automation system.
The Problem: My Agents Were Passive
When I first started with OpenClaw, I treated it like a chat interface. I’d send a prompt, get a response, send another prompt. The agent was reactive—waiting for me to initiate everything.
This worked fine for one-off tasks. But I had recurring needs:
- Daily digest of new issues in my GitHub repositories
- Weekly summary of competitor updates
- Morning check of my server logs for anomalies
- Regular backups of important workspace files
Each of these required me to remember the task, open OpenClaw, type the prompt, and wait for results. That’s not automation. That’s just a fancy to-do list.
I needed something that would:
- Run on a schedule without my involvement
- Use the right agent for each task
- Deliver results to me automatically
- Let me monitor what’s happening
My First Attempt: Manual Scheduling
I tried using external tools to trigger OpenClaw:
# Added to my system crontab0 9 * * * curl -X POST http://localhost:18789/api/agent/run -d '{"agent": "daily-summary", "prompt": "Check GitHub issues"}'This sort of worked, but it had problems:
- I had to manage cron jobs outside OpenClaw
- No visibility into task status inside OpenClaw
- Results went to logs, not to me
- No easy way to pause or modify tasks
Then I found out OpenClaw has a built-in cron system.
The Solution: OpenClaw’s Native Cron
OpenClaw’s cron system turns an agent from a chatbot into a worker. The key command is openclaw cron add:
openclaw cron add \ --schedule '[cron-expression]' \ --agent [agent-name] \ --prompt '[task-instruction]' \ --announceLet me break down each part.
Understanding the Components
The Schedule: Cron Expressions
The --schedule parameter accepts standard cron expressions:
┌───────────── minute (0 - 59)│ ┌───────────── hour (0 - 23)│ │ ┌───────────── day of month (1 - 31)│ │ │ ┌───────────── month (1 - 12)│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday = 0)│ │ │ │ │* * * * *Common patterns I use:
# Every day at 9:00 AM--schedule '0 9 * * *'
# Every Monday at 8:00 AM--schedule '0 8 * * 1'
# Every hour--schedule '0 * * * *'
# Every 6 hours--schedule '0 */6 * * *'
# First day of every month at midnight--schedule '0 0 1 * *'The Agent: Choosing the Right One
The --agent parameter specifies which agent configuration to use. I created specialized agents for different tasks:
name: daily-digestmodel: haiku-3.5 # Low tier for grunt worktools: - github-search - web-fetch - file-writeprompt_template: | You are a daily digest generator. Check the configured repositories and summarize: - New issues opened - PRs merged - Notable discussionsname: competitor-watchmodel: sonnet-4.5 # Higher tier for analysistools: - web-search - web-fetch - file-writeprompt_template: | You are a competitive intelligence agent. Monitor competitor websites and report significant changes.The key insight from Reddit discussions: use different model tiers for different tasks. Low tier models (haiku) for grunt work, high tier (sonnet, opus) for planning and thinking.
The Prompt: What to Do
The --prompt parameter contains the actual instruction. You can reference files or previous context:
# Simple instruction--prompt 'Check my top 5 GitHub repos for new issues opened in the last 24 hours and summarize them.'
# With file reference--prompt 'Read @workspace/daily-checklist.md and execute each item, reporting results.'
# With context--prompt 'Based on our previous conversation about monitoring server logs, check for ERROR entries in the last 24 hours.'Delivery Options: --announce vs --no-deliver
This is where it gets useful:
# --announce: Sends results to your configured channel# The agent wakes up, does the task, sends the result to the channel--announce
# --no-deliver: Runs silently, no notification# Useful for maintenance tasks where you only want alerts on failure--no-deliverFrom a Reddit discussion:
“Every morning at 9:00 the agent wakes up, does the task, sends the result to the channel. Without you touching anything.”
This is exactly what I wanted.
My First Working Setup
I started with a simple daily GitHub digest:
openclaw cron add \ --schedule '0 9 * * *' \ --agent daily-digest \ --prompt 'Check these repos for new issues in the last 24 hours: openclaw/openclaw, openclaw/docs, myorg/internal-tools. Create a summary grouped by repo with priority levels.' \ --announceThe next morning at 9:00 AM, I got a message in my configured channel:
📅 Daily GitHub Digest - March 11, 2026
## openclaw/openclaw- [P1] #234: Agent crashes on large file uploads- [P2] #231: Add support for custom tool endpoints
## openclaw/docs- [P3] #89: Update cron documentation
## myorg/internal-tools- No new issues in the last 24 hours
Total: 3 issues, 1 high priorityIt worked. I hadn’t touched anything.
Adding More Automation
Emboldened by success, I added more scheduled tasks:
# Every Monday at 8 AMopenclaw cron add \ --schedule '0 8 * * 1' \ --agent competitor-watch \ --prompt 'Check competitor sites: competitor1.com/pricing, competitor2.com/features. Compare to our baseline at @workspace/competitor-baseline.md and report any changes.' \ --announce# Every houropenclaw cron add \ --schedule '0 * * * *' \ --agent health-check \ --prompt 'Ping critical endpoints: api.example.com/health, db.example.com/status. Report any failures.' \ --no-deliver # Silent unless failure# First of every month at 2 AMopenclaw cron add \ --schedule '0 2 1 * *' \ --agent backup-agent \ --prompt 'Create backup of workspace/important-docs to backup-location with timestamp.' \ --announceNow I had a suite of automated workers.
Managing Cron Jobs
OpenClaw provides commands to manage your scheduled tasks:
# List all cron jobsopenclaw cron list
# Show details of a specific jobopenclaw cron show [job-id]
# Pause a job temporarilyopenclaw cron pause [job-id]
# Resume a paused jobopenclaw cron resume [job-id]
# Remove a job permanentlyopenclaw cron remove [job-id]
# Run a job immediately (for testing)openclaw cron run [job-id]Here’s what cron list shows:
ID Schedule Agent Last Run Status───────────────────────────────────────────────────────────────────cron-001 0 9 * * * daily-digest 2026-03-11 09:00 activecron-002 0 8 * * 1 competitor-watch 2026-03-10 08:00 activecron-003 0 * * * * health-check 2026-03-11 10:00 activecron-004 0 2 1 * * backup-agent never activeIntegration with Heartbeat
OpenClaw’s cron system integrates with heartbeat monitoring for reliability:
┌─────────────────────────────────────────────────────────────────┐│ Cron + Heartbeat Flow ││ ││ ┌─────────┐ ┌─────────┐ ┌─────────┐ ││ │ Cron │────►│ Agent │────►│ Task │ ││ │Schedule │ │Execute │ │Complete │ ││ └─────────┘ └─────────┘ └────┬────┘ ││ │ ││ ▼ ││ ┌─────────────────────────────────────────────────┐ ││ │ Heartbeat │ ││ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ ││ │ │ Success │ │ Failure │ │ Timeout │ │ ││ │ │ Log │ │ Alert │ │ Retry │ │ ││ │ └──────────┘ └──────────┘ └──────────┘ │ ││ └─────────────────────────────────────────────────┘ ││ │ ││ ▼ ││ ┌─────────────────────────────────────────────────┐ ││ │ Delivery Channel │ ││ │ --announce sends results here │ ││ └─────────────────────────────────────────────────┘ ││ │└─────────────────────────────────────────────────────────────────┘Heartbeat monitoring means:
- Automatic logging of every cron execution
- Alerts on failures or timeouts
- Retry logic for transient failures
- Historical tracking of task success rates
Model Selection Strategy
One mistake I made early on was using powerful models for everything. I had scheduled tasks using Opus for simple checks.
That’s wasteful. Here’s my current approach:
# Tier 1: Simple, repetitive tasksroutine-checks: model: haiku-3.5 tasks: - health checks - log scanning - data formatting - simple lookups cost: ~$0.25 per 1M tokens
# Tier 2: Moderate complexityanalysis: model: sonnet-4.5 tasks: - summarization - competitive analysis - report generation cost: ~$3 per 1M tokens
# Tier 3: Complex reasoningstrategic: model: opus-4.5 tasks: - architectural decisions - complex debugging - multi-step planning cost: ~$15 per 1M tokensMy daily digest uses haiku. My competitor analysis uses sonnet. Opus is reserved for tasks that need deep thinking.
Testing Your Cron Jobs
Before relying on a scheduled job, test it:
# Run immediately without schedulingopenclaw cron run [job-id]
# Or test the agent directly firstopenclaw agent run daily-digest \ --prompt 'Check these repos: openclaw/openclaw. Summarize issues.'I always test with cron run before letting a job run on schedule. This catches:
- Wrong schedule syntax (I’ve used
* 9 * * *instead of0 9 * * *) - Missing agent configuration
- Permission issues with tools
- Prompt errors
Common Mistakes I Made
Mistake 1: Wrong Cron Syntax
# WRONG: This runs EVERY MINUTE during hour 9--schedule '* 9 * * *'
# CORRECT: This runs ONCE at 9:00 AM--schedule '0 9 * * *'The first version ran my job 60 times in one hour. I got 60 identical reports.
Mistake 2: Forgetting --announce
# I ran this and wondered why nothing appearedopenclaw cron add \ --schedule '0 9 * * *' \ --agent daily-digest \ --prompt 'Check repos...'
# Without --announce, results go to logs only# Add --announce to receive resultsMistake 3: Over-Scheduling
# TOO FREQUENT for expensive operations--schedule '*/5 * * * *' # Every 5 minutes--prompt 'Analyze all competitor websites...'
# BETTER: Match frequency to task cost--schedule '0 9 * * *' # Daily for heavy analysisRunning a web scraping analysis every 5 minutes burned through my API budget in hours.
Mistake 4: Not Handling Failures
Scheduled tasks fail. Network issues happen. Services go down.
# Add retry logic in your agent configurationretry: max_attempts: 3 backoff: exponential on_failure: alert # Send notification on persistent failureMy Current Automation Stack
Here’s what I have running now:
| Schedule | Agent | Task | Model | Delivery |
|---|---|---|---|---|
| 0 9 * * * | daily-digest | GitHub issues summary | haiku | announce |
| 0 8 * * 1 | competitor-watch | Competitor monitoring | sonnet | announce |
| 0 * * * * | health-check | Endpoint monitoring | haiku | no-deliver |
| 0 2 1 * * | backup-agent | Monthly backup | haiku | announce |
| 30 17 * * 5 | weekly-review | Team activity report | sonnet | announce |
This runs completely hands-off. I just review the announcements that come in.
Quick Reference
# Add a new scheduled taskopenclaw cron add \ --schedule '0 9 * * *' \ --agent my-agent \ --prompt 'My instruction here' \ --announce
# List all cron jobsopenclaw cron list
# Test a job immediatelyopenclaw cron run [job-id]
# Pause/resume jobsopenclaw cron pause [job-id]openclaw cron resume [job-id]
# Remove a jobopenclaw cron remove [job-id]
# Common schedules# '0 9 * * *' - Daily at 9:00 AM# '0 9 * * 1' - Every Monday at 9:00 AM# '0 */6 * * *' - Every 6 hours# '0 0 1 * *' - Monthly on the 1stThe Bottom Line
Cron is what turns an agent from a chatbot into a worker. Without it, you’re stuck initiating every interaction. With it, your agents work on your schedule, not theirs.
The key points:
- Use standard cron expressions for scheduling
- Choose appropriate model tiers—haiku for simple tasks, sonnet for analysis
- Add
--announceto receive results automatically - Test with
cron runbefore relying on schedules - Handle failures gracefully with retry logic
My morning routine used to include logging in to check overnight activity. Now I just review the announcements that arrive automatically at 9:00 AM. The agents did the work while I slept.
That’s the power of automation.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments