Your AI agent is powerful. But if you have to manually tell it what to do every single time, you are leaving 80% of the value on the table. OpenClaw cron jobs let your agent run tasks on autopilot: morning briefings, weekly reports, social media scheduling, git backups. Set it once, forget it, let the agent work while you sleep.

What Are OpenClaw Cron Jobs

Cron is the Gateway's built-in scheduler. It lives inside the OpenClaw Gateway process, persists jobs to disk under ~/.openclaw/cron/, and survives restarts. No external service. No third-party integration. Just your agent, running tasks on a schedule you define.

Think of it as: when to run + what to do.

You tell your agent "check my email every morning at 7 AM" and it creates a cron job. That job fires every day at 7:00, spins up a session, does the work, and optionally sends you the result on Telegram, Discord, or wherever you are connected.

No code required. You can create cron jobs by just chatting with your agent: "Remind me to review my content calendar every Monday at 9 AM." OpenClaw handles the scheduling syntax internally.

Three Schedule Types: At, Every, Cron

OpenClaw supports three distinct schedule kinds. Each fits a different use case.

1. At (One-Shot)

Runs once at a specific time, then auto-deletes. Perfect for reminders.

openclaw cron add \
  --name "Reminder" \
  --at "2026-03-15T09:00:00+08:00" \
  --session main \
  --system-event "Reminder: review sponsor proposals" \
  --wake now \
  --delete-after-run

Timestamps without a timezone default to UTC. Always include your offset if you care about the exact local time.

2. Every (Fixed Interval)

Runs at a fixed interval in milliseconds. Good for polling tasks.

openclaw cron add \
  --name "Check inbox" \
  --every 1800000 \
  --session isolated \
  --message "Check for urgent unread emails and summarize."

That is every 30 minutes (1,800,000 ms). The CLI also accepts human-readable durations like 30m.

3. Cron (Standard Expressions)

The classic 5-field cron syntax. Most flexible option for recurring schedules.

openclaw cron add \
  --name "Morning brief" \
  --cron "0 7 * * *" \
  --tz "Asia/Singapore" \
  --session isolated \
  --message "Summarize overnight updates. Check calendar for today." \
  --announce

Supports 5-field and 6-field (with seconds) expressions. If you omit the timezone, it uses the Gateway host's local time.

Pro tip: OpenClaw applies a deterministic stagger window of up to 5 minutes for top-of-hour expressions like 0 * * * * to prevent load spikes. Use --exact to force precise timing when it matters.

Main vs Isolated Sessions

This is the decision that trips most people up. Every cron job runs in one of two modes.

Main Session

Injects a system event into your main chat session. The agent sees it during the next heartbeat and responds in your normal conversation thread.

Isolated Session

Spins up a completely separate session under cron:<jobId>. Fresh context every run. No conversation carry-over.

Rule: Main session requires systemEvent payload. Isolated requires agentTurn. Mix them up and the job will fail silently.

Setting Up Your First Cron Job

The fastest way? Just tell your agent what you want. In your Telegram or Discord chat:

"Set up a cron job to check my email every morning at 8 AM and send me a summary."

Your agent will call the cron tool internally and create the job. Done.

If you prefer the CLI, here is the exact command:

openclaw cron add \
  --name "Email digest" \
  --cron "0 8 * * *" \
  --tz "Asia/Singapore" \
  --session isolated \
  --message "Check Gmail for unread emails. Summarize anything urgent." \
  --announce

Verify it exists:

openclaw cron list

Test it immediately without waiting for the schedule:

openclaw cron run <job-id>

Check run history:

openclaw cron runs --id <job-id>

7 Real Automation Examples

These are actual cron jobs you can copy and adapt for your own setup.

1. Morning Briefing (Daily, 7 AM)

openclaw cron add \
  --name "Morning brief" \
  --cron "0 7 * * *" \
  --tz "Asia/Singapore" \
  --session isolated \
  --message "Check email, calendar for today, and any pending tasks. Send me a morning briefing." \
  --announce

2. Weekly Content Report (Mondays, 9 AM)

openclaw cron add \
  --name "Weekly report" \
  --cron "0 9 * * 1" \
  --tz "Asia/Singapore" \
  --session isolated \
  --message "Generate a weekly report: YouTube views, new subscribers, top tweets, newsletter signups. Compare to last week." \
  --announce

3. Social Media Scheduling (3x Daily)

openclaw cron add \
  --name "Post to X" \
  --cron "0 9,13,18 * * *" \
  --tz "Asia/Singapore" \
  --session isolated \
  --message "Pick the next scheduled draft and post it. Confirm with the post URL." \
  --announce

4. SEO Article Publisher (Twice Daily)

openclaw cron add \
  --name "SEO article" \
  --cron "0 9,21 * * *" \
  --tz "Asia/Singapore" \
  --session isolated \
  --message "Write and publish the next pending SEO article from the keyword queue." \
  --announce

5. One-Shot Reminder

Just tell your agent: "Remind me in 20 minutes to call the sponsor back." It creates an at job that fires once and self-deletes. No CLI needed.

6. Git Backup (Every 6 Hours)

openclaw cron add \
  --name "Git backup" \
  --cron "0 */6 * * *" \
  --session isolated \
  --message "Commit any uncommitted changes in the workspace and push to GitHub." \
  --delivery none

7. Health Check (Daily, 6 AM)

openclaw cron add \
  --name "Health check" \
  --cron "0 6 * * *" \
  --session isolated \
  --message "Run a system health check. Disk space, memory usage, open ports, failed services. Alert me if anything is off." \
  --announce

Cost control: Each isolated cron job run costs API tokens. For routine jobs, set a cheaper model override with --model to keep costs down. Save your expensive model for high-value tasks.

Cron Jobs vs Heartbeats

OpenClaw has two scheduling mechanisms. Knowing when to use each saves you headaches.

Cron JobsHeartbeats
TimingExact ("9:00 AM sharp")Approximate (~30 min intervals)
ContextFresh per run (isolated) or main sessionFull main session history
Best forPrecise schedules, standalone tasksBatched checks, context-aware actions
Model overrideYes, per jobUses main session model
DeliveryAnnounce, webhook, or silentReplies in main chat

Use cron when: exact timing matters, the task needs isolation, or you want a specific model for cost control.

Use heartbeats when: you want to batch multiple checks together, timing can drift, or the task needs your conversation context.

Most setups use both. Heartbeats for inbox and calendar monitoring. Cron for precise scheduled tasks like content publishing and weekly reports.

Debugging Failed Cron Jobs

Jobs not firing? Here is a checklist.

Check If the Job Exists

openclaw cron list

If your job is not listed, it was never created or was auto-deleted after a one-shot run.

Check Run History

openclaw cron runs --id <job-id>

This shows past runs with timestamps and status. Look for errors here.

Common Issues

Quick fix: Run openclaw doctor --fix to normalize any legacy cron store fields. This resolves most weird scheduling issues after an OpenClaw update.

For deeper troubleshooting, check out our OpenClaw Troubleshooting Guide.

Want to see all the things you can automate? Check our full list of OpenClaw use cases. If you are new to OpenClaw, start with What is OpenClaw and get it installed at installopenclawnow.com.

Running OpenClaw on a Mac Mini or VPS? Our Telegram bot setup guide shows you how to connect your agent to Telegram so cron job results land right in your chat.

OpenClaw Lab is the #1 community for founders building AI agent systems. I share the exact playbooks, skill files, and workflows inside. Weekly lives, expert AMAs, and 265+ members building real systems.

Join OpenClaw Lab →