Most people set up OpenClaw for on-demand conversations — you ask, it answers. But there's a second mode that's arguably more powerful: scheduled execution. OpenClaw's cron job system lets you define recurring tasks that run automatically, whether you're at your desk or not.
This means your AI assistant can send you a morning briefing every day at 7am, check your email inbox every 30 minutes, publish blog posts on a schedule, or run maintenance scripts weekly — all without you lifting a finger after setup. If you've been using OpenClaw primarily as a chat interface, cron jobs will change how you think about what your AI assistant can actually do.
How OpenClaw Cron Jobs Work
OpenClaw's cron system is built directly into the Gateway — the core server process that runs your assistant. When the Gateway starts, it loads any configured cron schedules and begins ticking. At each scheduled interval, it spins up a restricted execution agent, runs the defined prompt or script, and (optionally) delivers the output to a channel like Telegram or Discord.
This is fundamentally different from running a shell cron job that calls a script. OpenClaw cron jobs are AI-aware: the agent that executes has access to your skills, tools, and memory system. It can read files, make API calls, write summaries, and deliver results as natural language messages — not just log output.
Three key things to understand:
- Isolated by default: Each cron run starts in an isolated context. It doesn't see your chat history unless you explicitly fork session context.
- Tool access: The cron agent has the same tool permissions as your main agent, unless you restrict them per-job.
- Output routing: Results can be sent to any connected channel (Telegram, Discord, email via skill) or written to a file.
Setting Up Your First Cron Job
Cron jobs are defined in OpenClaw's configuration. If you've followed the VPS installation guide, your config lives at ~/.openclaw/config.yaml. Look for (or add) the crons section:
crons:
- id: morning-briefing
schedule: "0 7 * * *"
label: "Daily Morning Briefing"
prompt: |
Check my email for anything urgent received in the last 24 hours.
Check today's calendar events.
Summarise in 5 bullet points and send to Telegram.
channel: telegram
model: default
Save the file and restart the Gateway:
openclaw gateway restart
That's it. At 7:00 AM every day, OpenClaw will spin up an agent, run that prompt with your email and calendar skills, and push a summary to your Telegram.
Cron Schedule Syntax
OpenClaw uses standard 5-field cron syntax:
# ┌── minute (0-59)
# │ ┌── hour (0-23)
# │ │ ┌── day of month (1-31)
# │ │ │ ┌── month (1-12)
# │ │ │ │ ┌── day of week (0-6, Sun=0)
# │ │ │ │ │
* * * * *
# Examples:
"0 7 * * *" # Every day at 7:00 AM
"0 9 * * 1" # Every Monday at 9:00 AM
"*/30 * * * *" # Every 30 minutes
"0 9,17 * * 1-5" # 9 AM and 5 PM, weekdays only
"0 0 * * 0" # Every Sunday at midnight
If you're not confident with cron syntax, you can ask OpenClaw directly in chat: "What's the cron expression for every weekday at 8:30am?" — it'll generate it for you.
Practical Cron Job Examples
Daily Morning Briefing
- id: morning-briefing
schedule: "0 7 * * *"
label: "Morning Briefing"
prompt: |
Summarise: unread emails from the last 12 hours, today's calendar,
and any urgent tasks in my task list. Send to Telegram as bullet points.
channel: telegram
Weekly Blog Post Publisher
- id: blog-publish-tue
schedule: "0 10 * * 2"
label: "Blog Post — Tuesday"
prompt: |
You are a RESTRICTED execution agent for install-openclaw.net blog publishing.
Check heartbeat-state.json for the next slug. Write, publish, and push.
channel: telegram
Inbox Zero Checker (Every 30 Minutes)
- id: email-check
schedule: "*/30 * * * *"
label: "Email Check"
prompt: |
Check for new emails. If there are any marked urgent or from known
clients, summarise and send to Telegram. Otherwise stay silent (HEARTBEAT_OK).
channel: telegram
End-of-Day Summary
- id: eod-summary
schedule: "0 18 * * 1-5"
label: "End-of-Day Summary"
prompt: |
What did I accomplish today? Check my calendar completed events,
any files modified today in the workspace, and any Telegram messages
I sent. Write a short summary and save to memory/YYYY-MM-DD.md.
channel: telegram
Cron vs Heartbeat: Which Should You Use?
OpenClaw has two scheduling mechanisms and choosing the right one matters:
Use cron when:
- Exact timing matters ("9:00 AM sharp, every Monday")
- The task needs isolation from your main session history
- You want a different model or thinking level for the task
- The output should be delivered to a channel independently
- One-shot reminders ("remind me in 20 minutes")
Use heartbeat when:
- Multiple checks can batch together (email + calendar + notifications)
- You need conversational context from recent messages
- Timing can drift slightly (every ~30 min is fine)
- You want to reduce API calls by combining periodic checks
In practice: heartbeat for ambient awareness, cron for precision tasks. If you're running OpenClaw alongside n8n, you can also trigger cron jobs from n8n webhooks — giving you the best of both worlds.
Advanced: Session Context and Memory
By default, cron agents start isolated — they can't read your chat history. But you can change this:
- id: weekly-review
schedule: "0 10 * * 0"
label: "Weekly Review"
context: fork
prompt: |
Review this week's memory files and the last 7 days of daily notes.
Write a weekly summary to memory/weekly-YYYY-WW.md and send highlights
to Telegram.
channel: telegram
The context: fork setting clones the current session state into the cron agent, giving it access to recent conversation history. Use this sparingly — it increases token usage and can introduce noise if your session context is large.
For most scheduled tasks, isolated is better. The agent reads what it needs from files (memory, state JSON, workspace files) rather than inheriting conversation history.
Debugging Cron Jobs
When a cron job doesn't seem to be running, check these in order:
- Gateway logs:
openclaw gateway statuswill show recent cron fire events - Schedule syntax: Double-check your cron expression with an online validator
- Timezone: OpenClaw uses the system timezone by default — confirm with
dateon your VPS. Settimezone: Europe/Londonin your cron config if needed - Channel config: If output isn't reaching Telegram, verify your channel is connected (Telegram setup guide)
- Skill permissions: If the agent can't access email or calendar, check that those skills are installed and configured
You can also test a cron job manually — just run it as a one-shot prompt in your main session with the same instructions. If it works there, it'll work in cron.
Cron Jobs and the OpenClaw Memory System
One of the most powerful patterns is using cron jobs to maintain your OpenClaw memory system automatically. Rather than relying on yourself to update memory files, a nightly cron job can do it for you:
- id: nightly-memory-update
schedule: "0 23 * * *"
label: "Nightly Memory Update"
prompt: |
Read today's workspace activity: any new or modified files, terminal
commands run, Telegram messages received. Write a daily note to
memory/YYYY-MM-DD.md. Keep it under 500 words.
channel: telegram
Combine this with a weekly memory consolidation job that reads the daily notes and updates MEMORY.md with distilled insights, and your AI assistant builds a continuously improving understanding of your work — without you ever having to manually maintain it.
Real-World Cron Stack
Here's a practical cron setup for a typical solopreneur using OpenClaw:
crons:
# Morning briefing — daily at 7am
- id: morning-briefing
schedule: "0 7 * * *"
prompt: "Check email and calendar. Send 5-bullet summary to Telegram."
channel: telegram
# Email check — every 30 min during work hours
- id: email-watch
schedule: "*/30 9-18 * * 1-5"
prompt: "Any urgent emails? Notify Telegram if yes. HEARTBEAT_OK if not."
channel: telegram
# Weekly review — Sunday at 10am
- id: weekly-review
schedule: "0 10 * * 0"
context: fork
prompt: "Summarise this week. Update MEMORY.md highlights."
channel: telegram
# Nightly memory log — 11pm
- id: nightly-log
schedule: "0 23 * * *"
prompt: "Log today's activity to memory/YYYY-MM-DD.md."
channel: telegram
This stack gives you ambient awareness without being overwhelming. The email watch uses conditional output — it only notifies you when something needs attention, keeping your Telegram clean the rest of the time.
What's Next
Cron jobs are where OpenClaw transitions from a reactive chat tool to an active AI agent with memory that works for you around the clock. Start simple: one morning briefing job. Run it for a week, tune the prompt, then layer in more jobs as you identify the repetitive tasks you want automated.
For more on building comprehensive automation workflows with OpenClaw, see the 15 Things You Can Automate with OpenClaw — many of those use cases work best when paired with a cron schedule.