OpenClaw Cron Jobs: Schedule Your AI Agent (Complete Guide)
One of OpenClaw's most powerful features is the ability to schedule your AI agent to run tasks automatically. Instead of asking your agent to do something every morning, you schedule it once and it runs forever. This guide covers everything about OpenClaw cron jobs, from basic syntax to advanced scheduling patterns.
OpenClaw cron job scheduling overview
What Are OpenClaw Cron Jobs?
OpenClaw cron jobs are scheduled prompts that run at specified times. When a cron job fires, it sends a message to your agent as if you had typed it yourself. The agent processes it, executes any necessary skills, and can send results to your channels or email.
Think of them as automated conversations. Instead of you saying "Give me a weather report every morning," the cron job says it for you.
Basic Commands
Add a Cron Job
# Basic syntax
openclaw cron add "schedule" "prompt"
# Example: Daily weather at 7:30 AM
openclaw cron add "30 7 * * *" "What's the weather forecast for today? Send a brief summary."
# With a name for easy management
openclaw cron add --name "morning-weather" "30 7 * * *" "Weather forecast summary for today"
List All Cron Jobs
openclaw cron list
# Output:
# ID Name Schedule Next Run Status
# 1 morning-weather 30 7 * * * 2026-04-06 07:30 active
# 2 weekly-report 0 17 * * 5 2026-04-11 17:00 active
# 3 health-check */5 * * * * 2026-04-05 14:35 active
Remove a Cron Job
# By ID
openclaw cron remove 1
# By name
openclaw cron remove --name "morning-weather"
# Test a cron job immediately
openclaw cron run 1
# Or by name
openclaw cron run --name "morning-weather"
Cron Schedule Syntax
OpenClaw uses standard cron syntax with five fields:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * *
Common Schedules
Schedule
Cron Expression
Description
Every 5 minutes
*/5 * * * *
Frequent checks
Every hour
0 * * * *
Hourly updates
Every morning at 7 AM
0 7 * * *
Daily morning routine
Every evening at 6 PM
0 18 * * *
End of day
Weekdays at 9 AM
0 9 * * 1-5
Work days only
Every Monday at 10 AM
0 10 * * 1
Weekly review
First of the month
0 9 1 * *
Monthly report
Every 30 minutes during business hours
*/30 9-17 * * 1-5
Business monitoring
Shorthand Expressions
OpenClaw also supports readable shorthands:
openclaw cron add --every "day at 7:30am" "Morning briefing"
openclaw cron add --every "hour" "Check server status"
openclaw cron add --every "monday at 10am" "Weekly team summary"
openclaw cron add --every "weekday at 9am" "Start of day tasks"
Cron syntax reference diagram
Practical Examples
Morning Briefing
A daily digest of everything you need to know:
openclaw cron add --name "morning-briefing" "30 7 * * *" \
"Good morning! Give me today's briefing:
1. Weather forecast
2. Calendar events for today
3. Unread emails summary (top 5)
4. Top news headlines
Send the summary to my Telegram."
Daily Email Report
Generate a report and email it to your team:
openclaw cron add --name "daily-report" "0 17 * * 1-5" \
"Generate a daily activity report:
- Tasks completed today
- Issues encountered
- Tomorrow's priorities
Format as a clean email and send via Inbounter to team@company.com"
If you are using Inbounter for email delivery, the agent can send formatted HTML emails directly through the API.
Weekly Summary
openclaw cron add --name "weekly-summary" "0 17 * * 5" \
"It's Friday! Generate a weekly summary:
- Key accomplishments this week
- Metrics and trends
- Plans for next week
Send to my Telegram and email it to me via Inbounter."
Server Health Check
openclaw cron add --name "health-check" "*/15 * * * *" \
"Run a quick server health check:
- Check disk usage (alert if > 80%)
- Check memory usage
- Check if all services are running
- Check SSL certificate expiry
Only message me if something is wrong."
Database Backup Reminder
openclaw cron add --name "backup-reminder" "0 2 * * *" \
"Run the database backup script at /home/user/scripts/backup.sh
and verify the backup was created successfully.
If the backup fails, send an urgent notification via Inbounter SMS."
RSS Feed Digest
openclaw cron add --name "rss-digest" "0 8 * * *" \
"Check my RSS feeds and create a morning digest:
- AI/ML news
- Tech industry news
- Hacker News top 5 stories
Summarize each article in 2-3 sentences. Send to Telegram."
Example cron job outputs
Timezone Handling
Cron jobs run in the timezone configured in your OpenClaw settings. This is critical to get right or your morning briefing will fire at 3 AM.
Check Your Timezone
openclaw config get timezone
Set Your Timezone
openclaw config set timezone "America/New_York"
Or in config.yaml:
system:
timezone: "America/New_York"
Available Timezone Identifiers
Use standard IANA timezone names:
America/New_York (Eastern)
America/Chicago (Central)
America/Denver (Mountain)
America/Los_Angeles (Pacific)
Europe/London
Europe/Berlin
Asia/Tokyo
Asia/Kolkata
Australia/Sydney
Handling DST Changes
OpenClaw automatically adjusts for Daylight Saving Time changes. A job scheduled for 7:00 AM will always run at 7:00 AM local time, regardless of DST transitions.
Error Handling
What Happens When a Cron Job Fails?
If the agent encounters an error during a cron job:
The error is logged to the cron job's execution history
# See recent cron job executions
openclaw cron history
# For a specific job
openclaw cron history --name "morning-briefing" --limit 10
# Output:
# Time Job Status Duration
# 2026-04-05 07:30:00 morning-briefing success 12.3s
# 2026-04-04 07:30:00 morning-briefing success 14.1s
# 2026-04-03 07:30:00 morning-briefing failed 3.2s
Debugging Failed Jobs
# View the full output of a specific execution
openclaw cron history --name "morning-briefing" --id 42 --verbose
# Run the job interactively for debugging
openclaw cron run --name "morning-briefing" --debug
Cron error handling flow
Advanced Patterns
Chaining Cron Jobs
Run jobs in sequence by setting dependencies:
openclaw cron add --name "collect-data" "0 6 * * *" \
"Collect today's metrics from all data sources"
openclaw cron add --name "generate-report" --after "collect-data" \
"Generate a report from the collected metrics"
Conditional Execution
Include conditions in your prompts:
openclaw cron add --name "rainy-day-alert" "0 7 * * *" \
"Check the weather. If rain is forecast for today, send me a Telegram message saying 'Bring an umbrella!' If no rain, do nothing."
Variable Substitution
Use template variables in cron prompts:
openclaw cron add --name "daily-standup" "0 9 * * 1-5" \
"Today is {{date}}. Generate a standup update:
- What was completed yesterday ({{yesterday}})
- What is planned for today
- Any blockers"
Rate Limiting
Prevent cron jobs from overwhelming your LLM budget:
cron:
rate_limit:
max_concurrent: 1 # One job at a time
min_interval: 60 # At least 60s between jobs
daily_budget: 100000 # Max tokens for cron per day
Monitoring Cron Jobs
Status Dashboard
# Quick overview
openclaw cron status
# Output:
# Total jobs: 5
# Active: 4
# Paused: 1
# Last execution: 2026-04-05 14:30:00 (health-check) - success
# Next execution: 2026-04-05 14:45:00 (health-check)
# Today's token usage: 12,340 / 100,000
Email Summaries
Configure a daily summary of cron job activity sent via Inbounter:
Cron jobs are persisted in the database. After a restart, all active cron jobs resume automatically. Any jobs that were missed during downtime are skipped (not retroactively executed).
Can cron jobs access the agent's memory?
Yes. Cron jobs run in the same context as interactive messages. The agent has access to its full memory and SOUL.md during cron execution.
How many cron jobs can I have?
There is no hard limit. Practical limits depend on your token budget and server resources. Most users have 5-15 active cron jobs.
Need your scheduled OpenClaw tasks to send emails or SMS? Inbounter provides reliable delivery APIs designed for AI agent automation. Perfect for cron job notifications and reports.
Build faster with SuperBuilder
Run parallel Claude Code agents with built-in cost tracking, task queuing, and worktree isolation. Free and open source.