Introduction to Cron Jobs
OpenClaw can automatically execute tasks on a schedule using cron jobs. Perfect for:
Creating a Cron Job
Using the CLI
openclaw cron add \
--name "Morning Brief" \
--cron "0 7 * * *" \
--message "Give me today's schedule and any urgent emails"Cron Expression Format
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6)
│ │ │ │ │
* * * * *Common Schedules
0 7 * * *0 * * * *0 9 * * 1-50 18 * * 0Managing Cron Jobs
List All Jobs
openclaw cron listDelete a Job
openclaw cron delete --name "Morning Brief"Pause/Resume
openclaw cron disable --name "Morning Brief"
openclaw cron enable --name "Morning Brief"Heartbeat Mode
For periodic checks without specific scheduling:
{
"automation": {
"heartbeat": {
"enabled": true,
"interval": "30m"
}
}
}The agent runs every 30 minutes to check for tasks.
Webhook Triggers
For event-driven automation:
openclaw webhooks create --name github-eventsThis creates an endpoint that triggers your agent when called.
Troubleshooting
Cron Job Not Firing
openclaw cron listopenclaw statusopenclaw logs --followWrong Timezone
Set your timezone in config:
{
"automation": {
"timezone": "America/New_York"
}
}Advanced: Email-Triggered Automation
Connect Gmail for email-triggered tasks:
{
"automation": {
"gmail": {
"enabled": true,
"watchLabels": ["INBOX"]
}
}
}Need Help Setting Up Automation?
Contact us for professional automation configuration.