1
0
Fork 0
claude-code-complete-agent/automation/README.md
Kjell Tore Guttormsen 2491f5c732 feat: initial companion repo for OpenClaw vs Claude Code article
40 files demonstrating every major OpenClaw capability using Claude Code:
- 3 agents (researcher, writer, reviewer)
- 3 skills (daily-briefing, slack-message, web-research)
- 2 security hooks (pre-tool-use blocker, post-tool-use logger)
- 10 self-contained examples with copy-paste prompts
- Complete feature map (20 capabilities, 11 full match, 7 different, 2 gap)
- Security docs including NemoClaw comparison
- Automation, messaging, browser, memory documentation

Zero dependencies. Clone and run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:47:29 +01:00

64 lines
2.3 KiB
Markdown

# Automation
Four ways to schedule or trigger Claude Code tasks, with OpenClaw equivalents.
## 1. `/loop` - In-session recurring tasks
Run a task repeatedly within a single Claude Code session.
```
/loop Run /health-check every 30 minutes
```
**Best for:** Monitoring during active work sessions, watch loops, polling.
**OpenClaw equivalent:** `HEARTBEAT.md` pattern - agent checks a file on each tick
and executes tasks listed there.
## 2. `CronCreate` - Claude Code built-in cron
Claude Code can create system crontab entries directly via the `CronCreate` tool.
```
# In a Claude Code session:
Create a cron job that runs /daily-briefing every day at 7 AM
```
Claude calls `CronCreate` and writes the entry to your system crontab.
List with `CronList`, remove with `CronDelete`.
**Best for:** Simple recurring tasks, no manual crontab editing.
**OpenClaw equivalent:** OpenClaw's scheduler daemon with task definitions in config.
## 3. `/schedule` - Remote triggers via claude.ai/code
Trigger Claude Code runs remotely through claude.ai/code using the `RemoteTrigger`
tool or the web interface.
**Best for:** Event-driven automation, triggering from external systems.
**OpenClaw equivalent:** OpenClaw's webhook receiver (listens on a local port).
## 4. `launchd` - macOS native scheduler
More reliable than cron on macOS. Survives sleep/wake cycles, logs stdout/stderr,
and integrates with the macOS service manager.
See `daily-briefing.sh` and `launchd-example.plist` in this directory.
```bash
# Install:
cp launchd-example.plist ~/Library/LaunchAgents/com.example.claude-briefing.plist
launchctl load ~/Library/LaunchAgents/com.example.claude-briefing.plist
```
**Best for:** Production schedules on Mac, anything that needs to survive reboots.
**OpenClaw equivalent:** Same - OpenClaw also recommends launchd on macOS for its
daemon process.
## Comparison
| Approach | Setup | Reliability | Use case |
|---------------|----------|-------------|-------------------------------|
| `/loop` | Zero | Session | Active monitoring |
| `CronCreate` | Minimal | Good | Simple recurring tasks |
| `/schedule` | Moderate | Good | Remote/event triggers |
| `launchd` | Manual | Best on Mac | Production daily jobs |