Configuration & CLI CLI Commands

OpenClaw Cron Add: Automate Anything on a Schedule [Setup]

One command turns your agent into a timer-driven system that fires tasks, digests, and alerts without you touching a keyboard. Most builders don't know the full flag set. Here's everything you need to schedule reliably.

MK
M. Kim
AI Product Specialist
Feb 5, 2025 14 min read CLI Commands
Updated Feb 2025
Key Takeaways
openclaw cron add registers recurring tasks inside the gateway — no external cron daemon needed
Use standard 5-field cron syntax; seconds are not supported
Target any channel with --channel [id]; get IDs from openclaw channels list
Use --skill instead of --message to run dynamic skill-based tasks on schedule
All cron jobs persist across gateway restarts and are managed with openclaw cron list/remove

Scheduling used to mean setting up a system cron job, pointing it at a script, and hoping the daemon stayed healthy. With OpenClaw, that entire layer disappears. Three seconds after running openclaw cron add, your agent has a recurring task that fires without any OS-level setup.

I've built automated daily briefings, monitoring loops, and weekly report generators using this command. The flag set is small but the patterns it unlocks are significant. Let me walk you through all of them.

What openclaw cron add Actually Does

The command registers a scheduled task with the OpenClaw gateway process. At the specified interval, the gateway constructs a message and delivers it to a channel — exactly as if a user had typed it. The agent receives it, processes it, and responds normally.

This means cron jobs are fully subject to your agent's soul, memory, and configured skills. A scheduled "generate daily summary" message will use the same LLM, the same context, and the same tools as any other message. There's no special execution mode.

The cron scheduler runs inside the gateway. It persists to the gateway's local data store, survives restarts, and requires no system-level permissions beyond whatever the gateway already has.

ℹ️
Gateway must be running
Cron jobs only fire when the gateway is active. If the gateway is down when a job is scheduled to run, that occurrence is skipped. The next scheduled occurrence will fire normally when the gateway is back up.

Basic Syntax and Flags

The minimal form of the command looks like this:

openclaw cron add --schedule "0 9 * * *" --channel CHANNEL_ID --message "Send morning briefing"

Every flag has a purpose. Here's the complete reference:

Flag Required Description
--schedule Yes 5-field cron expression
--channel Yes Target channel ID
--message One of: message or skill Text to send on schedule
--skill One of: message or skill Skill name to trigger on schedule
--name No Human-readable label for the job
--timezone No IANA timezone string (default: UTC)
--no-retry No Disable retry on delivery failure
--enabled No Create paused (false) or active (true, default)

Always add --name. Without it, the only identifier is an auto-generated UUID, which makes management painful when you have a dozen scheduled jobs.

Cron Expression Patterns That Actually Matter

OpenClaw uses standard 5-field POSIX cron syntax. The fields are: minute hour day month weekday. Seconds are not supported — don't add a sixth field.

Common expressions you'll actually use:

# Every day at 8 AM UTC
--schedule "0 8 * * *"

# Every weekday at 9 AM
--schedule "0 9 * * 1-5"

# Every Monday at 7 AM
--schedule "0 7 * * 1"

# Every hour
--schedule "0 * * * *"

# Every 30 minutes
--schedule "*/30 * * * *"

# First of every month at midnight
--schedule "0 0 1 * *"
💡
Validate before adding
Use crontab.guru to verify your expression before running openclaw cron add. A wrong expression creates a silent job that either never fires or fires at the wrong time. As of early 2025, there's no dry-run flag — validation is manual.

The --timezone flag accepts any IANA timezone string. Use this for user-facing schedules so you're not mentally converting UTC offsets at 2 AM.

openclaw cron add \
  --schedule "0 9 * * 1-5" \
  --channel my-channel-id \
  --message "Send morning standup summary" \
  --name "weekday-standup" \
  --timezone "America/New_York"

Targeting the Right Channel

The --channel flag takes a channel ID, not a channel name. Get the list of available channel IDs by running:

openclaw channels list

The output shows each channel's ID, type, and name. Copy the ID — it's usually a UUID or a human-readable slug depending on your gateway version.

You can schedule the same message to multiple channels by running cron add multiple times with different --channel values but the same schedule. Give each one a distinct --name so you can manage them individually.

⚠️
Channel ID vs channel name
Passing a channel name instead of a channel ID will fail silently in some gateway versions — the job gets created but never delivers. Always use the ID from openclaw channels list, not the display name you set during channel setup.

Scheduling Skills Instead of Messages

Fixed messages work for simple triggers. For anything dynamic — reports that pull live data, monitoring checks that evaluate current state, or summaries generated from recent conversation history — use --skill instead.

openclaw cron add \
  --schedule "0 8 * * 1" \
  --channel reporting-channel-id \
  --skill weekly-summary \
  --name "monday-weekly-summary" \
  --timezone "Europe/London"

The skill receives the scheduled trigger and runs its own logic. It can query external APIs, read memory, aggregate data, and return a formatted response. This is how you build agent-powered weekly digests that actually contain fresh information rather than a canned prompt.

Skills must be installed and active in your gateway before you schedule them. Run openclaw skills list to confirm the skill name matches exactly — cron jobs referencing missing skills fail silently at execution time.

Common Mistakes and How to Avoid Them

Not adding a --name

Without --name, every job is identified by a UUID. When you need to pause or remove a specific job three months later, you'll be guessing which UUID belongs to which task. Add a descriptive name every time.

Wrong timezone assumption

The default timezone is UTC. If your team is on Eastern time and you schedule "0 9 * * *" expecting 9 AM EST, it fires at 4 AM local time. Always specify --timezone for anything user-facing.

Scheduling against a channel that no longer exists

If you delete or reconfigure a channel, any cron jobs targeting its old ID keep running but deliver to nowhere. After removing a channel, run openclaw cron list and clean up orphaned jobs manually.

Setting --message and --skill simultaneously

Only one delivery mode is active per job. If you pass both flags, the gateway uses the message and ignores the skill. Decide which mode you need before registering the job.

Frequently Asked Questions

What does openclaw cron add do?

openclaw cron add registers a recurring scheduled task with your OpenClaw gateway. You specify a cron expression, an agent channel, and a message or command to send. The gateway fires the task on schedule without any external cron daemon — it runs entirely within the OpenClaw process.

What cron expression format does OpenClaw use?

OpenClaw uses standard 5-field cron syntax: minute hour day-of-month month day-of-week. For example, 0 9 * * 1-5 fires at 9 AM on weekdays. Seconds are not supported. Use crontab.guru to validate expressions before adding them.

Can I run a cron job on a specific agent channel?

Yes. The --channel flag targets a specific channel ID. Run openclaw channels list to get your channel IDs, then pass the ID to --channel. The scheduled message is delivered to that channel exactly as if a user sent it manually.

How do I list or remove scheduled cron jobs?

Use openclaw cron list to see all active schedules with their IDs and expressions. To remove a job, run openclaw cron remove [id] using the ID from the list output. Changes take effect immediately — no restart required.

Does the cron job persist across gateway restarts?

Yes. Cron jobs added via openclaw cron add are persisted to the gateway's data store and survive restarts. As long as the gateway process starts successfully, all registered cron jobs resume automatically on the next scheduled interval.

What happens if the agent is unavailable when a cron job fires?

The gateway queues the scheduled message and attempts delivery when the agent reconnects. If you want strict fire-and-forget behavior with no retry, add --no-retry to the cron add command. By default, one retry attempt is made after 60 seconds.

Can I use a cron job to send dynamic content rather than a fixed message?

Yes. Use the --skill flag instead of --message to trigger a skill on schedule. The skill runs its own logic and can generate dynamic output. This is the pattern to use for daily digests, monitoring alerts, and report generation workflows.

MK
M. Kim
AI Product Specialist
M. Kim has shipped automation workflows across enterprise and indie stacks, specializing in agent scheduling, channel orchestration, and CLI tooling for OpenClaw deployments. Has built scheduled agent systems handling 500+ daily automated tasks across multi-channel setups.
Get the Automation Edge
New OpenClaw guides every week — straight to your inbox.