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.
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 * *"
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.
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.