> For the complete documentation index, see [llms.txt](https://www.openclawbook.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.openclawbook.xyz/en/ch05-scheduling-and-automation/5.3-automation-case-studies.md). Agents can also search and read this documentation through its [MCP server](https://www.openclawbook.xyz/~gitbook/mcp).

# 5.3 Automation Case Studies

> **Generated by**: Claude Opus 5 (claude-opus-5\[1m]) **Token usage**: Input \~200,000 tokens, Output \~9,000 tokens (this section) **Source baseline**: `v2026.3.9` (`v2026.3.8-170-g665f67726`)

***

Concrete examples, each with the reasoning behind its configuration choices.

## 5.3.1 Weather Briefing and Server Monitoring

### Morning briefing

```bash
openclaw cron add \
  --schedule "0 7 * * *" \
  --message "Get today's weather for Berlin and my calendar for today. Write a short briefing: weather in one line, then meetings with times. Skip pleasantries." \
  --isolated \
  --model "claude-haiku" \
  --deliver announce --channel telegram --to "123456789"
```

Three choices worth explaining:

| Choice                 | Why                                                                                       |
| ---------------------- | ----------------------------------------------------------------------------------------- |
| `--isolated`           | A briefing doesn't need yesterday's conversation                                          |
| `--model claude-haiku` | Fetching and formatting doesn't need a large model — this runs 365 times a year           |
| "Skip pleasantries"    | Without it you get "Good morning! I hope you're having a wonderful day!" every single day |

> **That last one generalizes**: a scheduled prompt is read hundreds of times, so it's worth over-specifying the format. Anything you find mildly annoying on day one you'll find intolerable by day thirty.

### Server monitoring

```bash
openclaw cron add \
  --schedule "*/30 * * * *" \
  --message "Check https://myservice.example/health. If the status isn't ok, or the response takes over 2 seconds, report it with details. If everything is fine, reply exactly NOTHING_TO_REPORT." \
  --isolated \
  --model "claude-haiku" \
  --deliver announce --channel telegram --to "123456789"
```

The `NOTHING_TO_REPORT` convention matters: without it you get a message every 30 minutes saying everything is fine, and you stop reading them. **An alert you always receive is an alert you never read.**

> For this pattern you may prefer the **heartbeat** instead (§26.4.3): put the check in `HEARTBEAT.md`, and it rides along with other checks in one turn rather than paying for a turn every 30 minutes. The trade is timing precision.

## 5.3.2 Daily Reports and News Digests

### Work summary from git history

```bash
openclaw cron add \
  --schedule "0 18 * * 1-5" \
  --message "Run 'git -C ~/projects/myapp log --since=midnight --oneline'. Summarize what was done today in 3-5 bullets, grouped by theme. If there were no commits, reply NOTHING_TO_REPORT." \
  --isolated \
  --deliver announce --channel telegram --to "123456789"
```

Notice this needs `exec` access to run git — and the command is specific enough to sit comfortably on an allowlist.

### News digest with deduplication

```bash
openclaw cron add \
  --schedule "0 8 * * *" \
  --message "Read my RSS list at ~/openclaw-workspace/feeds.md, fetch each, and write a digest of items published in the last 24 hours. Group by topic. Note in memory/YYYY-MM-DD.md which items you covered so tomorrow doesn't repeat them." \
  --isolated \
  --deliver announce --channel telegram --to "123456789"
```

**The memory note is the interesting part.** An isolated session has no conversation history, so it can't remember what it sent yesterday — but it *can* write to the daily memory file and read it back tomorrow (§28.5.1's memory is plain Markdown).

That's a general technique: **isolated jobs get continuity through files, not through session history.**

## 5.3.3 Backups and Deployment

### Backup with verification

```bash
openclaw cron add \
  --schedule "0 3 * * *" \
  --message "Run the backup script at ~/scripts/backup.sh. Then verify: check that a new archive exists in ~/backups with today's date and a size over 1MB. Report only if the backup failed or the verification didn't pass." \
  --isolated \
  --deliver announce --channel telegram --to "123456789"
```

**The verification step is what makes this worth doing with an agent** rather than a plain cron entry. A shell cron job runs the script; an agent runs it *and checks the result made sense*.

### Deploy verification

Triggered by a CI webhook rather than a schedule:

```bash
curl -X POST https://your-gateway/hooks/agent \
  -H "Authorization: Bearer $HOOK_TOKEN" \
  -d '{
    "message": "The site just deployed. Open https://mysite.example, screenshot the homepage, check that the page title is correct and no console errors appear. Report pass or fail with the screenshot.",
    "name": "Deploy Verify",
    "channel": "telegram",
    "to": "123456789",
    "deliver": true
  }'
```

This uses the browser tool (§4.3) to do what a human would do after a deploy — actually look at the site.

## 5.3.4 Practical Lessons

Collected from the patterns above:

**1. Always give a "nothing to report" convention.** Otherwise you train yourself to ignore the channel.

**2. Over-specify the output format.** You'll read this output hundreds of times. Specify length, structure, and what to omit.

**3. Use cheap models for fetch-and-format, good models for judgment.** A briefing assembler doesn't need the same model as a code reviewer.

**4. Give isolated jobs continuity through files.** They have no session history; the daily memory file is how they remember across runs.

**5. Test with `openclaw cron run <id>` before trusting the schedule.** The most common failure is a job that works but produces something you didn't want — and discovering it a week later.

**6. Prefer heartbeat for low-urgency periodic checks.** Several checks amortized into one turn is much cheaper than several turns (§26.4.4's comparison table).

**7. Watch what automation can reach.** A job processing external content (email, webhooks) should run isolated, ideally with a restricted skills snapshot, and never with `security: "full"`.

***

## Section Summary

1. **Specify output format aggressively in scheduled prompts** — you'll read the output hundreds of times, and day-one mild annoyance becomes day-thirty intolerable.
2. **Always define a "nothing to report" convention** — an alert you always receive is an alert you never read.
3. **Cheap models for fetch-and-format, good models for judgment** — a briefing assembler and a code reviewer don't need the same tier.
4. **Isolated jobs get continuity through files, not session history** — writing to the daily memory file is how a job remembers what it did yesterday.
5. **Verification is what makes agent automation worth more than a shell cron entry** — running a backup is easy; checking the result made sense is the value.
6. **Test with `cron run` before trusting a schedule**, and **prefer heartbeat for low-urgency periodic checks** (several checks amortized into one turn).
7. **Automation processing external content should run isolated with restricted skills** and never with `security: "full"`.
