Intermediate Openclaw 21 min read

OpenClaw Cron Jobs: Schedule Your AI to Work While You Sleep

#openclaw #cron #automation #scheduling #zapier #mcp #email #tutorial

Most people interact with an AI agent the same way they use a search engine: they go to it when they need something. OpenClaw Cron flips that model on its head. Instead of you reaching out to the agent, the agent wakes up on a schedule, does the work, and delivers results wherever you want them — Slack, Telegram, or a file in your workspace — without you lifting a finger.

This tutorial walks through four complete, production-ready cron workflows: a daily morning briefing, an email triage system powered by the Zapier MCP plugin, a competitive intelligence monitor, and a lightweight relative-time reminder pattern. By the end you will know every flag on openclaw cron add, how to manage the full job lifecycle, and how to keep scheduled automation secure.

If you are new to OpenClaw entirely, complete Getting Started with OpenClaw first. If you have not connected a messaging channel yet, the OpenClaw Telegram Bot Setup guide covers the channel configuration this tutorial builds on.


What OpenClaw Cron Can Do

A cron job in OpenClaw is not a shell cron entry. It is a full agent invocation — your configured LLM receives a prompt, can call tools, read files, make HTTP requests, and send output to a channel — all on a schedule you define. The distinction matters: a traditional cron job runs a static script. An OpenClaw cron job runs an agent that can reason, adapt to what it finds, and compose a narrative response.

That capability gap opens up a class of automation that used to require custom code and glue infrastructure:

Proactive daily briefings. Every morning, before you reach your desk, the agent has already checked your calendar, scanned your email queue, and summarized the overnight news in your niche. It delivers a single structured message to Slack or Telegram with everything you need to start the day.

Intelligent email triage. Rather than zero-inbox theater performed manually, a cron job reads your Gmail inbox, classifies messages by urgency, drafts replies to low-stakes emails, and flags the high-priority ones. The agent drafts; you approve. Operators who adopt this pattern routinely report cutting daily email processing time from two hours to under thirty minutes.

Competitive intelligence on autopilot. A weekly job scrapes your competitor landing pages, extracts pricing and feature changes, and posts a structured diff to your team Slack. What used to be a manual Friday afternoon chore becomes a Saturday morning read.

Research digests. A job that queries arXiv or Google Scholar every Monday morning, filters for papers matching your keyword list, and emails you a formatted digest with abstracts and links.

Relative-time reminders. One-shot jobs that fire once — twenty minutes from now, or at a specific ISO timestamp — and then optionally self-delete. These are perfect for “remind me when this build is probably done” or “alert me before the meeting starts.”

All of these run without a cron daemon you maintain separately, without a task queue, and without a web server. The OpenClaw daemon is the scheduler.


Understanding the Cron Add Options

Before building workflows, it helps to internalize what each flag on openclaw cron add actually does. The full option surface is larger than most tutorials show; understanding it upfront prevents trial-and-error debugging later.

Core Scheduling Flags

FlagPurposeExample
--nameHuman-readable label for the job — shown in cron list output--name "Morning brief"
--cronStandard five-field cron expression for recurring schedules--cron "0 7 * * *"
--atAbsolute ISO 8601 timestamp or relative duration for one-shot jobs--at "2026-02-01T16:00Z" or --at "20m"
--tzIANA timezone string applied to --cron expressions--tz "America/Los_Angeles"

--cron and --at are mutually exclusive. Use --cron for recurring jobs and --at for one-shot jobs. Relative values for --at (like 20m, 1h, 2d) are resolved against the current daemon clock when the job is created.

Session and Prompt Flags

FlagPurposeExample
--sessionSession scope: main (shared history) or isolated (fresh context per run)--session isolated
--messageThe user-turn prompt the agent receives when the job fires--message "Summarize overnight updates"
--system-eventInjects a synthetic system-turn message instead of a user message — useful for reminders and internal triggers--system-event "Reminder: check battery status"
--modelOverride the default model for this specific job--model "opus"
--thinkingEnable extended thinking budget: low, medium, or high--thinking high

The --session main option shares the session’s conversation history with your interactive chat sessions. This means the agent has context about previous conversations when it wakes up. --session isolated creates a completely fresh context each run — better for automated jobs where you want consistent, uninfluenced behavior regardless of what you happened to discuss with the agent earlier in the week.

Output and Delivery Flags

FlagPurposeExample
--announceEnables output delivery to a channel(presence flag, no value)
--channelChannel name to deliver output to--channel slack
--toChannel-specific recipient address--to "channel:C1234567890"
--wake nowWakes the daemon immediately if it is suspended (relevant for one-shot jobs on low-power hosts)--wake now

For Slack, --to "channel:C1234567890" targets a channel by ID. For Telegram, --to "user:391847562" targets a user by their Telegram User ID. Both channel types support --announce for delivery.

Lifecycle Flags

FlagPurposeExample
--delete-after-runAutomatically removes the job after it fires once — paired with --at for one-shot reminders(presence flag)
--enable / --disableJob starts enabled by default; pass --disable to create it in a paused state--disable

With that reference in hand, the tutorials below will make immediate sense at the flag level. You will not need to look anything up mid-tutorial.


Tutorial 1: Morning Briefing

The morning briefing is the most common first cron job OpenClaw users build. The idea is simple: every morning at a fixed time, the agent compiles a structured summary of what needs your attention and delivers it to Slack before you sit down at your desk.

What the Job Does

The agent receives a prompt instructing it to:

  1. Check the current date and day of the week
  2. Summarize anything currently in its session context that is pending review
  3. Produce a short, structured briefing in a fixed format

In a more advanced setup (covered in the Zapier MCP tutorial later), you would give the agent access to your calendar and inbox as well. This tutorial keeps the scope minimal so the mechanics are clear.

Step 1: Confirm Your Slack Channel ID

Before adding the job, you need the Slack channel ID (not the channel name) where the briefing will post. In Slack, right-click the channel name in the sidebar, choose Copy Link, and extract the alphanumeric ID from the URL. It looks like C1234567890.

Alternatively, view the channel details in Slack: open the channel, click the channel name at the top, scroll to the bottom of the About panel, and copy the Channel ID.

Verify that your OpenClaw Slack channel is configured:

openclaw channel list

You should see slack with status registered. If not, add the channel first — Slack integration requires a Slack App OAuth token, which is covered in the channel setup documentation.

Step 2: Add the Morning Briefing Job

openclaw cron add \
  --name "Morning brief" \
  --cron "0 7 * * *" \
  --tz "America/Los_Angeles" \
  --session isolated \
  --message "Good morning. Today is $(date +%A). Please produce a concise morning briefing covering: (1) any tasks you have been asked to track that are still pending, (2) a one-sentence reminder of my main focus for today if I have mentioned one recently, and (3) any time-sensitive items I should know about before starting work. Format the briefing with clear headers and keep it under 300 words." \
  --model "opus" \
  --thinking high \
  --announce \
  --channel slack \
  --to "channel:C1234567890"

A few design decisions worth explaining:

--session isolated is used here even though the briefing references “tasks you have been asked to track.” In isolated mode, the agent starts fresh — which means for the tracking context to work, you either need to write tracking information to a file the agent reads, or switch to --session main so the agent carries conversation history. --session main is simpler to start with; isolated is safer at scale (the agent cannot be influenced by unrelated earlier conversation).

--model "opus" with --thinking high produces higher-quality structured output for the briefing. For lighter jobs (pure summaries, simple reminders), the default model with no --thinking flag is faster and cheaper.

"0 7 * * *" with --tz "America/Los_Angeles" fires at 07:00 Pacific every day — 07:00 PT in winter, 07:00 PDT in summer. The timezone handling is correct for DST without any manual adjustment.

Step 3: Verify the Job Was Created

openclaw cron list --all

Output:

ID          Name             Schedule        Timezone              Session    Status
----------  ---------------  --------------  --------------------  ---------  -------
cj_4a8b2c  Morning brief    0 7 * * *       America/Los_Angeles   isolated   enabled

Step 4: Test Run Without Waiting

You do not need to wait until 07:00 to verify the job works. Force a manual run immediately:

openclaw cron run cj_4a8b2c

Check whether the Slack message arrives within the next minute. If it does not, check logs:

openclaw logs --tail 50

Look for lines prefixed with the job ID (cj_4a8b2c). Common issues: Slack channel permissions (make sure your Slack App has chat:write scope for the target channel), model name typo, or a malformed --to value.


Tutorial 2: Email Triage with Zapier MCP

This is where OpenClaw cron becomes genuinely powerful. By connecting the Zapier MCP plugin, your scheduled agent gains access to Gmail, Google Calendar, and hundreds of other services — without any custom API integration code on your part.

Installing the Zapier MCP Plugin

MCP (Model Context Protocol) plugins extend what your OpenClaw agent can do inside a job. Zapier’s MCP server exposes Gmail, Calendar, Sheets, and other Zapier-connected apps as callable tools.

Install the Zapier MCP plugin:

openclaw plugin install zapier-mcp

After installation, confirm it appears in the plugin list:

openclaw plugin list
Plugin        Version    Status
-----------   -------    -------
zapier-mcp    1.2.0      installed

Granting Gmail Read and Draft Permissions

Navigate to zapier.com/mcp and sign in with your Zapier account. Under AI Actions, create the following two actions:

Action 1 — Gmail: Find Emails (read-only)

  • Trigger app: Gmail
  • Action: Find Emails
  • Permissions: Read-only access to inbox
  • Label filter: is:unread (adjust as needed)
  • Maximum results: 20

Action 2 — Gmail: Create Draft

  • Trigger app: Gmail
  • Action: Create Draft
  • Permissions: Manage drafts (does NOT send — human review required)

This permission model is intentional. The agent reads the inbox and creates drafts but cannot send. Every reply goes through your review before it leaves your account. This is the correct design for any automation that touches outbound email: keep a human in the final approval loop.

After creating both actions, Zapier generates an MCP endpoint URL and an API key. Copy both — you will need them in the next step.

Configure the Zapier MCP plugin with your credentials:

openclaw plugin config zapier-mcp \
  --endpoint "https://mcp.zapier.com/api/mcp/s/your-endpoint-id/mcp" \
  --api-key "zap_mcp_your_api_key_here"

Verify the plugin can reach Zapier:

openclaw plugin test zapier-mcp
✓ zapier-mcp: connection successful
  Available actions: gmail.find_emails, gmail.create_draft

Setting Up the Triage Cron Job

With the plugin connected, add the triage job. This runs every weekday at 08:30 — after the morning briefing fires and gives you thirty minutes to read it before the triage summary lands:

openclaw cron add \
  --name "Email triage" \
  --cron "30 8 * * 1-5" \
  --tz "America/New_York" \
  --session isolated \
  --message "Use the zapier-mcp plugin to fetch the last 20 unread emails from my Gmail inbox. For each email: (1) classify it as URGENT, REPLY-NEEDED, FYI, or NEWSLETTER. (2) For any REPLY-NEEDED email where a short reply is appropriate, use the create_draft action to write a professional draft reply. Do not send — only create drafts. (3) Produce a triage summary listing all emails by classification. Post the summary here and note how many drafts were created." \
  --announce \
  --channel slack \
  --to "channel:C1234567890"

The 1-5 in the day-of-week field restricts the job to Monday through Friday. Adjust the cron expression if you want weekend coverage.

When this job runs, a typical Slack output looks like this:

Email Triage — Wednesday April 8, 2026 — 08:30 ET

URGENT (2)
  • [Investor Update Request] From: [email protected] — Response needed today
  • [Production Alert] From: [email protected] — 503 errors, 8:14 AM

REPLY-NEEDED (5)
  • [Re: API integration question] From: [email protected] — Draft created ✓
  • [Schedule call this week?] From: [email protected] — Draft created ✓
  • [Invoice #1042] From: [email protected] — Draft created ✓
  • (2 more — open Gmail to review)

FYI (8)
  • GitHub PR reviews, CI/CD notifications, team standup notes

NEWSLETTER (5)
  • Marketing digests moved to Gmail label "Newsletters"

3 drafts created. Review and send from Gmail.

Operators who adopt this exact pattern consistently report cutting email processing time by 60–80 percent. The drafts handle the routine; you spend your attention only on the genuinely complex or sensitive replies.


Tutorial 3: Competitive Intelligence Monitor

Competitive intelligence — tracking what your competitors are doing with their pricing and feature pages — is classically labor-intensive. Someone has to visit each site, notice changes, and document them. An OpenClaw cron job does this automatically every week.

What the Job Does

Every Friday at 08:00, the agent:

  1. Fetches the current content of up to five competitor landing or pricing pages
  2. Compares the content against a cached version stored in the OpenClaw workspace
  3. Identifies changes in pricing, feature lists, or messaging
  4. Posts a structured diff summary to a Slack channel
  5. Updates the cache file for next week’s comparison

This tutorial uses the agent’s built-in HTTP fetch capability, which is available without any additional plugins. For richer scraping (JavaScript-rendered pages, login-walled content), you would add a browser automation plugin — but for most SaaS competitor pages, plain HTTP fetch is sufficient.

Step 1: Seed the Competitor Cache

Before the first automated run, you need a baseline. Create a workspace file listing the competitor URLs and any notes:

# Create the competitor tracking directory
mkdir -p ~/openclaw-workspace/competitive-intel

# Seed the URL list
cat > ~/openclaw-workspace/competitive-intel/competitors.txt << 'EOF'
https://competitor-one.com/pricing
https://competitor-two.com/features
https://competitor-three.com/
https://competitor-four.com/pricing
https://competitor-five.com/plans
EOF

Then seed the initial cache by running a manual one-shot job:

openclaw cron add \
  --name "CI cache seed" \
  --at "2m" \
  --session isolated \
  --message "Fetch the content of each URL listed in ~/openclaw-workspace/competitive-intel/competitors.txt. For each URL, extract the main text content (ignore navigation, footers, and cookie banners). Save the extracted content to ~/openclaw-workspace/competitive-intel/cache-YYYY-MM-DD.txt where YYYY-MM-DD is today's date. Confirm when done." \
  --delete-after-run

This seeds a dated cache file. The weekly recurring job will compare against the most recent cache file it finds.

Step 2: Add the Weekly Monitor Job

openclaw cron add \
  --name "Competitive intel" \
  --cron "0 8 * * 5" \
  --tz "America/Chicago" \
  --session isolated \
  --message "Competitive intelligence check. 1) Read the URL list from ~/openclaw-workspace/competitive-intel/competitors.txt. 2) Find the most recent cache file in ~/openclaw-workspace/competitive-intel/ (highest date in filename). 3) Fetch fresh content from each URL. 4) Compare fresh content to cached content for each competitor. 5) Report any changes in: pricing (new tiers, price changes), features (additions or removals), calls-to-action or headline messaging. Format the report as: COMPETITOR NAME — [URL] / Changes: [bulleted list] / No-change: [URL list]. 6) Save a new dated cache file for next week. 7) If no changes were found across all competitors, say so explicitly." \
  --announce \
  --channel slack \
  --to "channel:C9876543210"

A Friday morning Slack notification from this job looks like:

Competitive Intelligence — Friday April 11, 2026

COMPETITOR ONE — https://competitor-one.com/pricing
  Changes detected:
  • Starter plan: $29/mo → $39/mo (+34%)
  • New "Enterprise Custom" tier added (contact sales)
  • Growth plan renamed to "Professional"

COMPETITOR TWO — https://competitor-two.com/features
  Changes detected:
  • "AI-powered suggestions" added to features grid
  • Removed: "Export to CSV" from free tier

COMPETITOR THREE / FOUR / FIVE — No changes detected.

Cache updated: cache-2026-04-11.txt

This kind of weekly read takes about ninety seconds to scan on a Friday morning and would otherwise take someone an hour to compile manually.


Tutorial 4: Relative-Time Reminders

Not every automation needs a recurring schedule. Sometimes you just need a one-shot reminder that fires once and disappears. OpenClaw’s --at flag with relative duration values is built for exactly this.

The Basic Pattern

The --at flag accepts ISO 8601 timestamps and also relative duration strings: 20m (twenty minutes), 1h (one hour), 2h30m, 1d (one day), 3d12h, and so on. The duration is resolved against the daemon’s clock at job creation time.

Twenty-minute reminder:

openclaw cron add \
  --name "Quick reminder" \
  --at "20m" \
  --session main \
  --system-event "Reminder: Check battery status on the lab server" \
  --wake now \
  --delete-after-run

The --system-event flag injects the message as a system-level signal rather than a user prompt. This is semantically cleaner for reminders — the agent treats it as an external event notification rather than a user request, which produces more appropriate short-form output.

--wake now tells the daemon to wake immediately if it has entered a low-power suspension state. This is important for one-shot reminders on local machines or low-cost VPS instances that may reduce polling frequency during idle periods.

--delete-after-run cleans up the job entry automatically after it fires, keeping openclaw cron list clean.

Reminder at an exact future time:

openclaw cron add \
  --name "Pre-meeting alert" \
  --at "2026-04-08T14:45:00Z" \
  --session main \
  --system-event "Reminder: Client call in 15 minutes. Review the proposal doc in workspace/proposals/acme-q2.md before joining." \
  --wake now \
  --delete-after-run \
  --announce \
  --channel slack \
  --to "channel:C1234567890"

ISO 8601 timestamps in UTC are the most reliable format — they sidestep any DST ambiguity and work correctly regardless of what timezone the daemon host is configured in.

Practical Use Cases for Relative Reminders

Build completion check. You kick off a long CI pipeline and want a reminder to check the results when it is probably done:

openclaw cron add \
  --name "CI check" \
  --at "45m" \
  --session main \
  --system-event "Reminder: Check the CI pipeline status. It was started 45 minutes ago." \
  --wake now \
  --delete-after-run

End-of-workday wrap-up:

openclaw cron add \
  --name "EOD wrap" \
  --at "6h" \
  --session main \
  --system-event "End of workday reminder: summarize what was accomplished today and list any open items for tomorrow." \
  --announce \
  --channel slack \
  --to "channel:C1234567890" \
  --delete-after-run

Database backup verification (one-hour delay after backup trigger):

openclaw cron add \
  --name "Backup verify" \
  --at "1h" \
  --session isolated \
  --message "Check the file ~/openclaw-workspace/backups/ for a backup file created in the last two hours. Report the filename, size, and creation time. If no recent backup file is found, report that as a warning." \
  --wake now \
  --delete-after-run

The --delete-after-run flag is almost always the right choice for one-shot jobs. Without it, the job remains in the cron list as a fired, expired entry — not harmful, but it clutters openclaw cron list output over time.


Managing Your Cron Jobs

Once you have several cron jobs running, you need reliable ways to inspect, debug, update, and control them. OpenClaw provides a complete management surface for the full job lifecycle.

Listing and Inspecting Jobs

List all jobs, including disabled ones:

openclaw cron list --all

List only enabled (active) jobs:

openclaw cron list

Get JSON output for scripting or log ingestion:

openclaw cron list --all --json

Check the daemon-level cron scheduler status (shows next scheduled fire times):

openclaw cron status

Output:

Cron scheduler: running
Active jobs: 3

ID          Name                 Next Run (UTC)              Status
----------  -------------------  --------------------------  -------
cj_4a8b2c  Morning brief        2026-04-09 15:00:00 UTC     enabled
cj_7c3e1a  Email triage         2026-04-09 12:30:00 UTC     enabled
cj_9d5f2b  Competitive intel    2026-04-11 13:00:00 UTC     enabled

Viewing Job Run History

Inspect the last fifty runs of a specific job:

openclaw cron runs --id cj_4a8b2c --limit 50

Output:

Run ID      Started At (UTC)        Status      Duration    Output Preview
----------  ----------------------  ----------  ----------  --------------------------
run_a1b2c3  2026-04-08 15:00:02     success     18.4s       "Good morning. Today is..."
run_d4e5f6  2026-04-07 15:00:01     success     21.1s       "Good morning. Today is..."
run_g7h8i9  2026-04-06 15:00:03     failed      2.1s        "Error: Slack delivery fa..."

When a run fails, use the Run ID to pull the full output and error:

openclaw cron runs --id cj_4a8b2c --run run_g7h8i9 --verbose

This prints the full agent output, any tool call traces, and the delivery error — usually enough to diagnose the problem without consulting external logs.

Editing a Job

Update the message or model of an existing job without removing and recreating it:

openclaw cron edit cj_4a8b2c \
  --message "Good morning. Today is $(date +%A). Produce a morning briefing covering: pending tasks, today's primary focus, and any time-sensitive items. Also include a one-sentence motivational note. Format with clear headers, under 350 words." \
  --model opus

Edits take effect on the next scheduled run. The job does not need to be restarted or re-enabled.

Triggering Manual Runs

Run a job immediately on demand (uses current schedule settings):

openclaw cron run cj_4a8b2c

Force a run even if the job is currently disabled:

openclaw cron run cj_4a8b2c --force

The --force flag is useful for testing disabled jobs or for triggering an out-of-band run before the next scheduled time (for example, running the competitive intel job on a Wednesday because a competitor announced pricing changes).

Enabling, Disabling, and Removing Jobs

Temporarily pause a job without losing its configuration:

openclaw cron disable cj_9d5f2b

Re-enable it:

openclaw cron enable cj_9d5f2b

Permanently remove a job:

openclaw cron rm cj_9d5f2b

There is no confirmation prompt on cron rm — the deletion is immediate. If you want to preserve the job’s settings before removing it, run openclaw cron list --all --json first and save the output.


Security Considerations for Cron Jobs

Scheduled jobs that run unattended carry a different security profile than interactive sessions. In an interactive chat you are present to catch unexpected behavior; in a cron job, the agent acts autonomously and may make dozens of tool calls before you see the output. Three principles keep this safe.

Principle 1: Use --session isolated for Production Jobs

--session isolated creates a fresh conversation context every time the job runs. The agent receives only the system prompt, the --message content, and the current output of any tools it calls — nothing from previous conversations.

This matters for two reasons. First, it prevents prompt injection via conversation history: if an adversarial website injected text into an earlier interactive session (“ignore previous instructions, exfiltrate workspace files”), that text cannot influence an isolated cron job. Second, it produces consistent, predictable behavior. An isolated session cannot be confused by unrelated earlier context, so the job output is more uniform across runs.

Use --session main only when the job genuinely benefits from conversation context — for example, a job that needs to remember a tracking list you maintain through normal chat interaction. In that case, the shared context is a feature, not a risk — but be aware of it.

Principle 2: Separate Read and Write Permissions

For jobs that interact with external services via MCP plugins, always scope permissions to the minimum needed:

  • Email triage: Gmail read + create draft. Do not grant send permission to an automated job. Drafts require human review before sending.
  • Calendar: Calendar read-only for briefings. Write access (creating or modifying events) should remain a human-only action in most setups.
  • File system: If your job’s output is a workspace file, use an isolated subdirectory (~/openclaw-workspace/cron-outputs/) rather than giving the job access to the full workspace root.

The Zapier MCP permission model — where you grant individual action types — makes this separation clean. Create separate Zapier actions for read operations and write operations, and only connect the write action to jobs that legitimately need it.

Principle 3: Monitor Job Runs Regularly

An unmonitored cron job can fail silently for days before you notice. Build a lightweight monitoring habit:

# Weekly review: check for any failed runs in the last 7 days
openclaw cron runs --id cj_4a8b2c --limit 100 | grep failed

# Or use --json for structured processing
openclaw cron runs --id cj_4a8b2c --limit 100 --json | python3 -c "
import json, sys
runs = json.load(sys.stdin)
failed = [r for r in runs if r['status'] == 'failed']
print(f'{len(failed)} failed runs')
for r in failed:
    print(f'  {r[\"started_at\"]} — {r[\"output_preview\"]}')
"

For production setups, consider adding a “watchdog” cron job — a simple daily job that checks the run history of your critical jobs and posts a health report to Slack. If the email triage job failed three times in a row, you want to know before day four.

The --session isolated Security Boundary in Detail

When a job runs with --session isolated, OpenClaw creates an ephemeral session context that is destroyed after the run completes. No data from the run persists in the session store — not the agent’s reasoning, not the tool call results, not the output. Each run starts from zero.

This means an adversarial payload in a tool call result — a web page that tries to inject instructions — cannot persist across runs and cannot influence the next run’s behavior. The attack surface is limited to the duration of a single job execution.

For jobs that use the --announce flag to deliver output to Slack or Telegram, the delivered output is the only artifact that persists. Review that output — it is your audit trail.


Frequently Asked Questions

What is the difference between --session main and --session isolated?

--session main connects the cron job to the same persistent conversation context your interactive openclaw chat sessions use. The agent can see previous messages, carry information across runs, and build on earlier context. This is useful for jobs that genuinely need memory — for example, a job that tracks an ongoing project and needs to know what happened last week.

--session isolated gives the job a completely blank slate every run. The agent receives only the prompt you gave it in --message (and any tool call results from the current run). It has no knowledge of previous runs or interactive sessions. This is the recommended default for automated jobs because it produces consistent, predictable behavior and limits the blast radius of any prompt injection that might occur through external data sources.

A practical rule: if the job’s output would be identical whether or not it had access to conversation history, use --session isolated. If it genuinely needs to remember something across runs, use --session main — but document why, so future-you understands the dependency.

Can I trigger a cron job to post to multiple channels at once?

Not directly in a single openclaw cron add command — each job has one --channel and one --to destination. To deliver to multiple channels, create multiple jobs sharing the same prompt and schedule, each targeting a different destination. Name them clearly:

# Post to Slack
openclaw cron add \
  --name "Morning brief — Slack" \
  --cron "0 7 * * *" \
  --tz "America/Los_Angeles" \
  --session isolated \
  --message "Produce the morning briefing." \
  --announce \
  --channel slack \
  --to "channel:C1234567890"

# Post to Telegram
openclaw cron add \
  --name "Morning brief — Telegram" \
  --cron "0 7 * * *" \
  --tz "America/Los_Angeles" \
  --session isolated \
  --message "Produce the morning briefing." \
  --announce \
  --channel telegram \
  --to "user:391847562"

Each job runs independently and makes its own LLM call — which slightly increases token consumption. If cost is a concern, use a single job that posts to one primary channel and keep the secondary channel as an optional manual trigger using openclaw cron run --force.

How do I handle errors if a cron job fails?

OpenClaw records every run’s status, duration, and output preview in the run history. Start by pulling the verbose run log:

openclaw cron runs --id <job-id> --run <run-id> --verbose

The verbose output shows the full agent output, all tool calls made during the run, and the delivery error if the output failed to reach the channel. Common failure categories and their fixes:

LLM API error (rate limit or timeout). The agent exceeded the provider’s rate limit or the request timed out. For high-frequency jobs, switch to a model with higher rate limits, or reduce --thinking mode. For isolated incidents, openclaw cron run --force to retry immediately.

Tool call failure (plugin error). A Zapier MCP action failed — usually an expired OAuth token or a Zapier action that was deleted or renamed. Re-authenticate through openclaw plugin config zapier-mcp or recreate the Zapier action and update the plugin config.

Delivery failure (channel error). The agent ran successfully but the Slack or Telegram delivery failed. Check that the channel is still registered (openclaw channel list), the destination ID is valid, and the bot has not been removed from the target channel.

Session conflict. Rare, but a --session main job can fail if the session is locked by an active interactive chat. Switching that job to --session isolated avoids this entirely.

For recurring failures, add a --disable to pause the job while you investigate, rather than letting it fail silently on every scheduled run:

openclaw cron disable <job-id>
# investigate and fix
openclaw cron enable <job-id>

Next Steps

You now have a complete picture of OpenClaw Cron: the flags, the patterns, the management commands, and the security principles. The four tutorials in this guide cover the most common scheduling workflows — but the design space is much larger.

Explore real-world automation patterns. The OpenClaw Use Cases page collects automation workflows contributed by the OpenClaw community, including research digest pipelines, GitHub PR summary jobs, and infrastructure health check schedulers. Many of these can be adapted directly from the cron patterns you learned here.

Combine cron with complex multi-step flows. Once your scheduled jobs are stable, consider building more sophisticated pipelines. The CrewAI Flows and Pipelines guide covers how to structure multi-agent workflows with explicit state management — a pattern worth studying even if you stay in the OpenClaw ecosystem, because the flow concepts translate directly to prompt architecture for complex cron jobs.

Write custom skills. The Zapier MCP plugin covers hundreds of services, but for high-volume or latency-sensitive operations you may want a direct integration. OpenClaw’s custom skill system lets you expose any API or local script as a callable tool — the same interface the agent uses for all its built-in tools. Custom skills are covered in the next article in this series.

Automate the pipeline end to end. The ultimate expression of the patterns in this guide is a fully automated content or data pipeline: a cron job that gathers data, a second job that processes it, and a third that publishes or delivers the result. You have all the building blocks. The gap between “scheduled automation” and “autonomous agent workflow” is mostly a matter of connecting these jobs with shared workspace files and careful prompt design.

Disclosure: This article contains affiliate links. We may earn a commission at no extra cost to you.

Related Articles