Your First Cron Job
Schedule your agent to send you an automatic morning briefing every day.
By the end of this page, you'll have a working cron job that sends you a daily briefing at a time you choose — no manual trigger required.
Time: ~20 minutes
What you're building
A scheduled task that runs every morning and sends you something like:
Morning briefing — Wednesday, March 25
Weather: 14°C, partly cloudy. Rain expected around 3pm.
Today: Team standup at 10am, lunch with Marco at 1pm.
Emails: 3 unread. One from Sarah needs a reply.
This is OpenClaw's automation model: your agent acts without you asking.
How cron jobs work in OpenClaw
A cron job is a scheduled instruction. You define:
- When to run — using a cron schedule expression
- What to do — a prompt sent to your agent
- Where to send the result — which channel
OpenClaw runs these even when you're not using the agent. The Gateway handles the schedule.
Step 1 — Write the cron entry
Open ~/.openclaw/openclaw.json and add an automations key into your existing config — don't replace the whole file:
{
"provider": "...",
"channels": { "..." },
"automations": [
{
"id": "morning-briefing",
"schedule": "0 7 * * *",
"prompt": "Give me a morning briefing. Include: today's date and day, a brief weather summary for my location, my calendar events for today, and any emails that need a reply. Keep it short — 5-8 lines. Use plain text, no bullet points.",
"channel": "telegram"
}
]
}The provider and channels lines represent whatever you already have in the file. You're only adding the "automations" block.
The "channel": "telegram" value must match the channel name in your config. If you set up Telegram, use "telegram". If you're using a different channel, change it to match.
The schedule 0 7 * * * means: minute 0, hour 7, every day. Your agent runs at 7:00am.
Cron schedule quick reference:
| Schedule | Meaning |
|---|---|
0 7 * * * | Every day at 7:00am |
0 7 * * 1-5 | Weekdays only at 7:00am |
30 8 * * * | Every day at 8:30am |
0 18 * * * | Every day at 6:00pm |
Schedules run in your system timezone by default. To set a timezone explicitly, add "timezone": "America/New_York" to the automation object.
Running on a server or VPS?
Servers typically run in UTC. If your 7am briefing is arriving at noon, your system clock is UTC. Always set the timezone explicitly when running on a remote machine: "timezone": "America/New_York" (or your local timezone).
Step 2 — Restart the Gateway
openclaw gateway restartVerify your automation loaded:
openclaw cron listYou should see morning-briefing with its next scheduled run time.
Step 3 — Test it immediately
Don't wait until 7am. Run it now:
openclaw cron run morning-briefingThis triggers the job immediately and sends the result to your configured channel. Check Telegram (or wherever you configured channel).
What you'll see
Without any skills connected, your agent will respond with something like:
"I don't have access to real-time weather or your calendar right now. Here's what I can tell you: today is Wednesday, March 25, 2026. To add weather and calendar data, you'll need to connect those skills."
That's expected — your agent is honest about what it can and can't do. The next page covers connecting skills so it can actually fetch this data.
Even without skills, the scheduling mechanism is working. That's the important part.
Refine the prompt
The prompt is just text. Experiment with it:
"prompt": "Morning briefing for [your name]. Date, weather in [your city], calendar events, top emails. 5 lines max. No greetings."The more specific you are about format and length, the more consistent the output.