6
CourseMolt 1Chapter 6
Molt 1: The Hatchling
11 min read

Daily Workflows

Turn OpenClaw from something you talk to into something that works for you — with cron jobs, heartbeats, and automation patterns you can copy and paste.

6 of 10

Your Lobster Never Sleeps

In the last chapter, you built Argus and set it on a 6-hour schedule. You probably didn't think much about the cron job part — it was one line in a big prompt.

But that one line? That's the single most powerful idea in OpenClaw.

Because right now, OpenClaw only does things when you ask it to. You type, it responds. That's useful, but it's still a conversation. Workflows turn OpenClaw into something that works while you're not looking. Your morning briefing is ready before you wake up. Your security agent runs while you sleep. Your weekly cleanup happens whether you remember it or not.

This is the bridge between "I have a chatbot" and "I have an assistant."

What Are Workflows?

A workflow is any automation that runs without you typing a message. There are two flavors:

Cron jobs are time-based. "Do this every morning at 8 AM." "Do this every Sunday." "Do this every 6 hours." The clock triggers the action. You already used one with Argus — that every 6 hours instruction became a cron job behind the scenes.

Heartbeats are agent-based. When an agent wakes up on its schedule, it checks its HEARTBEAT.md file and runs through a list of tasks. You saw this with Argus too — the 5-phase patrol route. The heartbeat defines what the agent does when it wakes up. The cron job defines when it wakes up.

Think of it this way: the cron job is the alarm clock. The heartbeat is the morning routine.

Cron Basics (Less Scary Than They Look)

Cron uses a 5-field format to describe schedules. It looks like this:

┌───────────── minute (0–59)
│ ┌─────────── hour (0–23)
│ │ ┌───────── day of month (1–31)
│ │ │ ┌─────── month (1–12)
│ │ │ │ ┌───── day of week (0–6, Sunday = 0)
│ │ │ │ │
* * * * *

A * means "every." A number means "exactly this." That's pretty much all you need to know. Here are the patterns you'll use 90% of the time:

| Schedule | Cron expression | Plain English | |----------|----------------|---------------| | Every morning at 8 AM | 0 8 * * * | Minute 0, hour 8, every day | | Every hour | 0 * * * * | Minute 0, every hour, every day | | Every 6 hours | 0 */6 * * * | Minute 0, every 6th hour | | Every weekday at 9 AM | 0 9 * * 1-5 | Minute 0, hour 9, Monday–Friday | | Every Sunday at 6 PM | 0 18 * * 0 | Minute 0, hour 18, Sundays | | Twice a day (8 AM and 8 PM) | 0 8,20 * * * | Minute 0, hours 8 and 20 |

Tip

You don't have to memorize this. When you tell OpenClaw "every morning at 8 AM," it translates that to 0 8 * * * for you. The table is here so you can read cron expressions, not so you have to write them from scratch.

Warning

Cron jobs use your server's timezone. If your server is set to UTC and you're in New York, "8 AM" means 3 AM your time. Check your timezone with timedatectl (Linux) or date (macOS). If it's wrong, either adjust the hour in the cron expression or fix your server timezone.

Creating Your First Workflow

Let's build a simple morning briefing. Open your Telegram chat (or Gateway) and paste this:

Set up a daily workflow:

Every morning at 8 AM, send me a message with:
- What day it is and any notable events
- A summary of any agent reports from the last 24 hours
- A motivational quote to start the day

Name this cron job "morning-briefing".

OpenClaw will create the cron job and confirm the schedule. You can verify it was created:

openclaw cron list

You should see something like:

ID    Name               Schedule      Status
──    ────               ────────      ──────
1     argus-heartbeat    0 */6 * * *   active
2     morning-briefing   0 8 * * *     active

There's Argus from the last chapter, and your new morning briefing right below it.

Tip

Want to test it right now instead of waiting until tomorrow morning? Run openclaw cron trigger 2 to fire the job immediately. The number is the job ID from the list.

The Heartbeat Pattern

You've already seen this with Argus, but let's make it explicit because you'll use this pattern constantly.

A heartbeat is a checklist your agent follows when it wakes up. It lives in the agent's HEARTBEAT.md file. When the cron job fires, the agent reads its heartbeat and works through each phase.

Here's the simple version of what happens:

  1. Cron fires — "Hey, wake up"
  2. Agent reads HEARTBEAT.md — "What am I supposed to do?"
  3. Agent works through the phases — checks, tasks, reports
  4. Agent writes a report — logs what it found in memory/
  5. Agent goes back to sleep — waits for the next cron trigger

This is self-directed work. Nobody typed a message. Nobody was awake. The agent just did its job.

Compare this to how you normally use OpenClaw — you send a message, it responds. That's human-prompted work. Both are useful. Workflows let you shift more and more of the repetitive stuff into self-directed mode so you can focus on the interesting stuff.

Three Workflows You Can Copy Right Now

Here are three ready-to-paste workflows. Pick the ones that match your life and send them to your agent.

A. The Morning Briefing

Create a workflow called "morning-briefing":

Every morning at 8 AM, generate a briefing message and send it
to me on Telegram. Include:
- Today's day and date
- Any agent reports from the past 24 hours (summarize, don't
  dump the full reports)
- Weather forecast for [YOUR CITY]
- One motivational or interesting quote

Keep it short — no more than 10 lines. I want to read this
on my phone over coffee.
Tip

Replace [YOUR CITY] with your actual city. OpenClaw can look up weather using web browsing or a weather skill from ClawHub.

B. The Weekly Cleanup

Create a workflow called "weekly-cleanup":

Every Sunday at 6 PM:
- Archive agent memory files older than 7 days (move to
  memory/archive/)
- Generate a summary of the week: what agents ran, what they
  found, any issues flagged
- Write the summary to memory/weekly/YYYY-MM-DD.md
- Send me the summary on Telegram with a preview of the
  upcoming week's scheduled jobs

Name the cron job "weekly-cleanup".

C. The Health Check

Create a workflow called "health-check":

Every 6 hours:
- Check if the OpenClaw gateway process is running
- Check disk space (warn me if below 20%)
- Check if any agent cron jobs failed since last check
- If everything is fine, log "all clear" to
  memory/health/YYYY-MM-DD.md
- If something is wrong, log the issue AND send me an alert
  on Telegram immediately

Name the cron job "health-check".
Warning

Don't go overboard on the schedule. Running heavy workflows every 5 minutes will burn through your AI model credits fast. Start with daily or every-6-hours and adjust from there. You can always increase frequency later — it's harder to get a refund on wasted API calls.

Managing Your Workflows

Once you have a few workflows running, here's how to keep them organized:

List all jobs:

openclaw cron list

Remove a job you don't need anymore:

openclaw cron remove 2

Temporarily disable a job (without deleting it):

openclaw cron disable 2

Re-enable a disabled job:

openclaw cron enable 2

Trigger a job manually (great for testing):

openclaw cron trigger 2
Tip

Always give your cron jobs clear names like "morning-briefing" or "weekly-cleanup" instead of letting them auto-name. Future you will thank present you when you're staring at a list of 15 jobs and can't remember what "cron-7" does.

Common Workflow Patterns

As you build more workflows, you'll notice they fall into a few repeating patterns. Here's a cheat sheet:

The Morning Report — Start your day with an overview. Runs once daily, summarizes everything that happened overnight. Best for: briefings, daily agendas, overnight monitoring summaries.

The Heartbeat — Periodic agent check-ins. Runs every few hours, follows a checklist, logs results. Best for: security monitoring, system health, ongoing tasks that need regular attention.

The Reminder — Future alerts for specific events. Runs once or on a schedule, sends you a message. Best for: deadlines, follow-ups, "don't forget to do X on Friday."

The Cleanup — Periodic maintenance. Runs weekly or monthly, archives old files, generates summaries. Best for: keeping your memory directory tidy, pruning old logs, generating reports.

The Big Picture

Look at what you've built in the last two chapters:

  • Argus monitors security every 6 hours
  • Morning briefing catches you up every day
  • Health check watches the system itself
  • Weekly cleanup keeps everything tidy

That's four workflows running 24/7, doing work you'd otherwise have to remember to do yourself. And you set each one up with a single message.

This is the shift. OpenClaw isn't just something you talk to anymore. It's something that works for you — on its own schedule, without being asked.

What's Next

Workflows generate a lot of data. Argus writes security reports. The morning briefing pulls from agent logs. The weekly cleanup creates summaries. All of this goes into your agent's memory directory as Markdown files.

In the next chapter, we'll explore how OpenClaw's memory system works — how it stores what it learns, how you can search through it, and how QMD (Query Memory Documents) lets you find anything your agent has ever written down. Because there's no point generating all these reports if you can't find them when you need them.

Challenge

Create at least 3 cron jobs for your own daily routine. They don't have to be the exact examples above — adapt them to your life. Maybe you want a daily news summary, a reminder to stretch every 2 hours, or a nightly backup of your notes. Run openclaw cron list and screenshot it showing all your active jobs. Bonus: trigger one manually and show the output.

Chapter 6 of 10 complete

4 more chapters in this molt