Skip to main content
HowOpenClawv2026.6.8
Course

Module 6: Autonomous Tasks

Schedule OpenClaw automations: daily briefings, reminders and health checks. Cron syntax, time zones, pausing, run history and keeping the Gateway online.

0 of 10 modules complete0%
7 min read
What you will learn
  • Create, test and pause scheduled automations
  • Set schedules with cron syntax, intervals and time zones
  • Check run history when a job doesn't fire
  • Keep the Gateway running so jobs fire 24/7

So far your agent only acts when you message it. Automations make it proactive: a saved prompt that the Gateway runs on a schedule, like a 7am briefing or a weekday deploy digest. You manage them with openclaw automations (or its shorter spelling, openclaw cron). The Gateway has to be running for any of this to work.

Create your first automation

Put the schedule first and the prompt second:

openclaw automations create "0 7 * * *" \
  "Summarize overnight updates." \
  --name "Morning brief" \
  --tz "America/New_York" \
  --announce --channel telegram --to "<your-chat-id>"

This runs every day at 7:00 in New York time. Swap in your own IANA time zone, such as Europe/Madrid or America/Argentina/Buenos_Aires. The last line tells it where to post the result. A job created from the terminal needs a delivery target like this (see Choose where results go), while a job you create from a chat reports back to that chat. create is an alias for add, so openclaw automations add works the same way.

If you run more than one agent, add --agent <id> to pin the job to one. Without it, OpenClaw warns you and uses the configured default agent.

Common schedules

Cron expressions have five fields: minute, hour, day of month, month and weekday. A * means "every".

WhenSchedule
Every day at 7am0 7 * * *
Weekdays at 9am0 9 * * 1-5
Every Monday at 10am0 10 * * 1
First of each month at 9am0 9 1 * *
Every 30 minutes*/30 * * * * or "every 30m"
Once, 20 minutes from now--at 20m

Natural language like "every day at 9am" isn't accepted, and an invalid expression is rejected with examples of valid syntax. Use --every 1h for a plain interval. A one-shot --at job deletes itself after it succeeds, unless you add --keep-after-run.

Each run is a model call

Every agent run uses your AI provider, so a job every 30 minutes adds up over a month. Keep frequent jobs short, and check your provider's usage dashboard. See Pricing for what affects cost.

Test it now, don't wait for 7am

openclaw automations list
openclaw automations run <job-id>
openclaw automations runs <job-id> --limit 20

list shows your enabled jobs and their IDs. run forces one run right away and returns a runId. runs shows recent results with their status: ok, error or skipped. To see only failures, add --status error.

openclaw automations show <job-id> gives the human-readable view, including where results will be delivered. It also accepts the job's name instead of its ID.

Choose where results go

By default, a job created from a chat conversation reports back to that conversation. A job created from the terminal needs a delivery target:

# Post the result to a Slack channel
openclaw automations edit <job-id> --announce --channel slack --to "channel:C1234567890"

# Send the finished payload to a URL instead
openclaw automations edit <job-id> --webhook "https://example.com/openclaw-hook"

# Run it but deliver nothing
openclaw automations edit <job-id> --no-deliver

Pause, edit and remove

openclaw automations disable <job-id>   # pause
openclaw automations enable <job-id>    # resume
openclaw automations list --all         # include paused jobs
openclaw automations remove <job-id>    # delete

edit takes the same schedule flags as create, so openclaw automations edit <job-id> --cron "0 8 * * *" --tz "Europe/Madrid" moves a job to 8am Madrid time. Use these commands rather than editing files by hand: since 2026.6.1, jobs are stored in OpenClaw's SQLite state database.

Upgrading from an old install?

If you still have a jobs.json file from before 2026.6.1, install OpenClaw 2026.9.7 and run openclaw doctor --fix to migrate it before you upgrade to the latest version.

A quiet health check

Here's a job that checks in every 30 minutes and only messages you when something is wrong:

openclaw automations create "every 30m" \
  "Check that you can reach your tools and channels. If everything works, reply with exactly NO_REPLY. Otherwise, say what failed." \
  --name "Self-check" \
  --session isolated \
  --light-context \
  --announce --channel telegram --to "<your-chat-id>"

A final reply that's only NO_REPLY (uppercase, nothing else) sends no message, and the run is listed as ok (suppressed). --session isolated gives each run a fresh session, and --light-context skips loading the full workspace context, which keeps each run small.

To check the Gateway itself from outside, /health and /healthz on the Gateway port (18789 by default) return 200 when its HTTP server is up. Use /readyz if you need to know it's ready for traffic, not just alive.

Keep the Gateway running

An automation only fires if the Gateway is running at that moment. If your laptop sleeps, the 7am job doesn't run.

OptionGood for
Your own machine, kept awakeTesting, and jobs during the day
An always-on machine at home (Raspberry Pi, old laptop, mini PC)24/7 with no monthly bill
A small cloud server (VPS)24/7 without hardware at home

On macOS, caffeinate -i keeps the machine from idle-sleeping while it runs. On any always-on machine, install the Gateway as a background service so it starts on boot:

openclaw onboard --install-daemon
openclaw gateway status

For a fresh Linux server, the official installer sets up a supported Node version and OpenClaw, then starts onboarding:

curl -fsSL https://openclaw.ai/install.sh | bash

See System Requirements for the minimum hardware, including the Raspberry Pi table.

Don't expose the Gateway port

The Gateway listens on 127.0.0.1:18789 by default. Don't open that port to the internet on a server. Use an SSH tunnel or Tailscale for remote access (see Module 8).

If a job doesn't fire

  1. openclaw gateway status: was the Gateway running at the scheduled time?
  2. openclaw automations runs <job-id> --limit 20: did it run, and did it error?
  3. openclaw automations show <job-id>: is the schedule and time zone what you expect, and is the job enabled?

More fixes are in Troubleshooting.

Finished this module?

Tracks your progress across all 10 modules

FAQ

How do I schedule a task in OpenClaw?
Run openclaw automations create "0 7 * * *" "Summarize overnight updates." --name "Morning brief", plus a delivery target such as --announce --channel telegram --to <chat-id> when you create it from the terminal. The schedule comes first and the prompt second. Add --tz with an IANA time zone such as America/New_York so the time isn't read in the Gateway's default zone. Source: OpenClaw automations CLI.
Is it openclaw cron or openclaw automations?
Both work. The command registers as openclaw cron with openclaw automations as an alias, and every subcommand works with either spelling. Source: OpenClaw automations CLI.
Does my computer need to stay on for automations to run?
Yes. Automations run inside the Gateway, so a job only fires while the Gateway is running. Keep the machine awake, or run the Gateway on an always-on machine as a background service with openclaw onboard --install-daemon. Sources: OpenClaw automations CLI, install docs.
How do I pause an automation without deleting it?
Run openclaw automations disable <job-id>, and openclaw automations enable <job-id> to resume it. openclaw automations list --all shows disabled jobs too. Source: OpenClaw automations CLI.
Why didn't my OpenClaw automation run?
Check that the Gateway was running at the scheduled time, then run openclaw automations runs <job-id> --limit 20 to see each run's status and errors. openclaw automations show <job-id> shows the schedule and where results are delivered. Source: OpenClaw automations CLI.
How do I stop a health-check job from messaging me when everything is fine?
Tell the agent to reply with exactly NO_REPLY when there is nothing to report. A final reply that is only uppercase NO_REPLY sends no chat message, and the run shows as ok (suppressed). Source: OpenClaw automations CLI.