The moment you stop telling your AI assistant what to do and it starts doing things on its own — that’s when it becomes truly useful. OpenClaw’s cron system lets you schedule any task on a timer: morning briefings, periodic inbox checks, daily reports, reminders, or complex multi-step workflows that run while you sleep.

What Are Cron Jobs in OpenClaw?

Cron jobs are scheduled tasks that fire automatically. Unlike heartbeats (which poll at intervals within your main session), cron jobs run in isolated sessions — each gets its own context, model, and thinking level. This means your scheduled research task won’t pollute your main chat’s context window.

Three schedule types:

TypeUse CaseExample
atOne-shot at exact time”Remind me at 3pm”
everyRecurring interval”Check inbox every 2 hours”
cronCron expression”9am weekdays”

Your First Cron Job

Let’s start simple — a daily morning briefing at 8am:

{
  "name": "morning-briefing",
  "schedule": {
    "kind": "cron",
    "expr": "0 8 * * *",
    "tz": "Asia/Shanghai"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Good morning. Check my calendar for today, scan email for anything urgent, and give me a 3-bullet summary of what needs attention."
  },
  "sessionTarget": "isolated",
  "delivery": { "mode": "announce" }
}

Key parts:

  • schedule: Standard cron syntax — 0 8 * * * means “at 8:00 every day”
  • payload: The prompt your agent receives. Write it like you’re talking to your assistant.
  • sessionTarget: isolated: Runs in its own session (recommended for most cron jobs)
  • delivery: announce: Sends the result back to your chat

Practical Examples

Inbox Check Every 2 Hours

{
  "name": "inbox-check",
  "schedule": {
    "kind": "every",
    "everyMs": 7200000
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Check my email inbox. If there's anything urgent or from a known contact, summarize it. If nothing important, reply with just 'Inbox clear.'"
  },
  "sessionTarget": "isolated"
}

Weekly Report Every Monday

{
  "name": "weekly-report",
  "schedule": {
    "kind": "cron",
    "expr": "0 9 * * 1",
    "tz": "America/New_York"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Generate my weekly report: summarize what I accomplished this week from my daily notes, list open items, and suggest priorities for this week."
  },
  "sessionTarget": "isolated",
  "delivery": { "mode": "announce" }
}

One-Shot Reminder

{
  "name": "meeting-prep",
  "schedule": {
    "kind": "at",
    "at": "2026-02-14T13:30:00+08:00"
  },
  "payload": {
    "kind": "systemEvent",
    "text": "⏰ Reminder: Board meeting in 30 minutes. Review the deck and prep talking points."
  },
  "sessionTarget": "main"
}

Note: One-shot reminders use systemEvent in the main session — they inject directly into your current conversation.

Overnight Deep Work Session

{
  "name": "night-shift",
  "schedule": {
    "kind": "cron",
    "expr": "0 0 * * *",
    "tz": "Asia/Shanghai"
  },
  "payload": {
    "kind": "agentTurn",
    "message": "Night shift session. Check project status, pick the highest-priority buildable task, work on it for 30+ minutes, and document progress.",
    "model": "claude-opus-4-6",
    "thinking": "high"
  },
  "sessionTarget": "isolated",
  "delivery": { "mode": "announce" }
}

This is how power users run autonomous overnight work — the agent picks up tasks, builds, and delivers results by morning.

Cron vs Heartbeat: When to Use Which

This is the most common question. Here’s the rule of thumb:

Use cron when:

  • Exact timing matters (9:00 AM sharp)
  • The task needs isolation from your main chat
  • You want a specific model or thinking level
  • It’s a one-shot reminder
  • Output should go directly to a channel

Use heartbeats when:

  • Multiple checks can batch together (inbox + calendar in one turn)
  • You need recent conversation context
  • Timing can drift (every ~30 min is fine)
  • You want to reduce API calls

Pro tip: Batch similar periodic checks into your HEARTBEAT.md file instead of creating 5 separate cron jobs. Use cron for precise schedules and standalone tasks.

Managing Cron Jobs

List All Jobs

Ask your agent: “List my cron jobs” or “Show all scheduled tasks”

Disable Without Deleting

{ "enabled": false }

Useful when you’re traveling or want to pause a job temporarily.

Test Before Scheduling

Ask your agent to run the task once manually before scheduling it. This catches prompt issues before they fire at 3am.

Advanced Patterns

Chain Jobs with Context

Use contextMessages to include recent conversation context in your cron job:

{
  "payload": {
    "kind": "agentTurn",
    "message": "Continue working on whatever we discussed. Check the last few messages for context."
  },
  "contextMessages": 5
}

Multi-Channel Delivery

Route cron output to specific channels:

{
  "delivery": {
    "mode": "announce",
    "channel": "slack",
    "to": "channel:C0ACV1YPY1F"
  }
}

Cost-Conscious Scheduling

For routine checks, use a cheaper model:

{
  "payload": {
    "kind": "agentTurn",
    "message": "Quick inbox scan — anything urgent?",
    "model": "anthropic/claude-sonnet-4-20250514"
  }
}

Save Opus for complex tasks; use Sonnet or Haiku for simple checks.

Common Mistakes

  1. Too many cron jobs — Each isolated session burns tokens on system prompt alone. Batch where possible.
  2. Vague prompts — “Check stuff” produces vague results. Be specific: “Check my Gmail for unread messages from contacts in my CRM.”
  3. No delivery mode — Forgetting delivery: announce means the job runs but you never see the output.
  4. Wrong session targetsystemEvent requires main, agentTurn requires isolated. Mix them up and the job fails silently.

Real-World Setup: The Always-On Assistant

Here’s a complete cron setup for a founder running OpenClaw 24/7:

JobSchedulePurpose
Morning briefing8am dailyCalendar + email + priorities
Inbox checkEvery 3hUrgent email alerts
Daily standup9:30am weekdaysTeam status from project tools
Night shiftMidnightAutonomous deep work
Weekly reviewMonday 9amWeek summary + planning
Market scan6am dailyIndustry news + competitors

Six jobs, fully automated, running while you focus on what matters.

Getting Started

  1. Start with one job — a morning briefing is the easiest win
  2. Write a specific prompt — tell the agent exactly what to check and how to format the output
  3. Set delivery to announce — so you actually see the results
  4. Monitor for a week — adjust timing and prompts based on what’s useful
  5. Add more gradually — don’t build the full system on day one

The goal isn’t maximum automation — it’s the right automation. One well-tuned cron job that saves you 20 minutes daily is worth more than ten that produce noise.


Need inspiration for what to automate? Check out 5 automations every professional needs. Running multiple agents on cron? See the multi-agent setup guide. To keep cron job costs low, read our API cost reduction tips.