Skills cron-setup
Create and manage OpenClaw cron jobs following our conventions. Use when setting up periodic tasks, reminders, automated checks, or any scheduled work.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/brennerspear/cron-setup" ~/.claude/skills/openclaw-skills-cron-setup && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/brennerspear/cron-setup" ~/.openclaw/skills/openclaw-skills-cron-setup && rm -rf "$T"
skills/brennerspear/cron-setup/SKILL.mdCron Job Setup
Our conventions for creating cron jobs in OpenClaw.
Default Settings
| Setting | Default | Why |
|---|---|---|
| Model | | Reliable tool calls, works with any Anthropic Max plan — no OpenRouter needed |
| Session | | Cron jobs run in their own session, not the main chat |
| Delivery | | Job handles its own output (posts to Discord, etc.) |
| Timeout | 120-180s | Most jobs should finish fast |
Model Notes
- Default to Sonnet (
). Reliable, portable (no OpenRouter API key needed).anthropic/claude-sonnet-4-5 - DeepSeek is unreliable for tool calls — don't use it for cron jobs.
- Use Opus (
) only as a last resort — expensive for scheduled tasks.anthropic/claude-opus-4-6 - Model ID format: Use
not the full dated version (anthropic/claude-sonnet-4-5
).anthropic/claude-sonnet-4-20250514
Job Template
{ "name": "descriptive-kebab-case-name", "schedule": { "kind": "cron", "expr": "*/30 * * * *", "tz": "America/New_York" }, "sessionTarget": "isolated", "payload": { "kind": "agentTurn", "message": "TASK INSTRUCTIONS HERE", "model": "openrouter/deepseek/deepseek-v3.2", "timeoutSeconds": 120 }, "delivery": { "mode": "none" } }
Schedule Patterns
| Pattern | Cron Expression | Notes |
|---|---|---|
| Every 30 min | | Good for inbox checks, monitoring |
| Every hour | | Self-reflection, status checks |
| Daily at 4 AM | | Cleanup, backups (during quiet hours) |
| Daily at 6 AM | | Morning digests, daily summaries |
| Weekly Monday 2 PM | | Weekly outreach, reviews |
| One-shot | Use instead | Reminders, one-time tasks |
Task Instruction Conventions
- Be explicit with commands — Give the cron agent exact bash commands to run. It doesn't have our context.
- Include skip conditions — If there's nothing to do, the agent should reply
to avoid wasting tokens.SKIP - Handle its own output — The job should post results to Telegram (or wherever) using the
tool directly. Don't rely on delivery mode for formatted output.message - Include error handling — What should happen if a command fails?
- Keep instructions self-contained — The cron agent wakes up with no context. Everything it needs should be in the task message.
Telegram Posting from Cron Jobs
When a cron job needs to notify us, include these instructions in the task:
Post to Telegram using the message tool: - action: send - channel: telegram - target: -1003856094222 - threadId: TOPIC_ID - message: Your formatted message
Topic IDs:
— Main topic (general updates, alerts)1
— Research573
— Crypto1032
— PR updates / dev notifications1488
— Sticker store1869
— Activity feed (workspace changes)3188
Delivery Modes
| Mode | When to Use |
|---|---|
| Job posts its own output to Telegram (most common) |
| OpenClaw auto-delivers the agent's final message to a channel. Use when output IS the message (e.g., daily digest). Set and |
Anti-Patterns
❌ Don't use Opus for cron jobs unless the task genuinely needs it. Most cron tasks are simple checks. ❌ Don't use heartbeat for things that can be a cron job. Heartbeat runs in the main session (Opus) and costs way more. ❌ Don't create cron jobs that loop/poll — each run should be a single check. If you need polling, use a background exec script instead. ❌ Don't set delivery mode to "announce" and also have the job post to Telegram — you'll get duplicate messages.
Existing Jobs (Reference)
Check current jobs anytime with the
cron list tool. As of setup:
— Every 30 min, commits workspace changes, posts to activity feedworkspace-activity-feed
— Every 30 min, checks for new emails, responds to agentsagentmail-inbox-check
— Every 15 min, checks on stalled sub-agentssub-agent-monitor
— Hourly, reviews recent sessions for lessons learnedself-reflection
— Daily 4 AM, git commits workspace changesdaily-workspace-commit
— Daily 4 AM, checks system resourcessystem-watchdog
— Daily 6 AM, generates news digestOpenClaw Daily News Digest
— Weekly Monday 2 PM, agent outreach for sticker storesticker-sales-loop