Agent skill
cron-mastery
Master cron scheduling for automated tasks, reminders, and periodic workflows.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/cron-mastery
Metadata
Additional technical details for this skill
- openclaw
-
{ "emoji": "\u23f0", "category": "automation" }
SKILL.md
Cron Mastery
Schedule automated tasks, reminders, and periodic workflows using OpenClaw's cron system.
Quick Reference
Schedule Types
| Type | Format | Example |
|---|---|---|
| at | ISO timestamp | 2026-02-20T09:00:00Z |
| every | Interval in ms | everyMs: 3600000 (1 hour) |
| cron | Cron expression | 0 9 * * 1-5 (9am weekdays) |
Common Patterns
# Daily at 9am
cron: "0 9 * * *"
# Every hour
everyMs: 3600000
# Monday at 8am
cron: "0 8 * * 1"
# Every 30 minutes during business hours
cron: "*/30 9-17 * * 1-5"
Use Cases
1. Daily Morning Brief
{
"name": "morning-brief",
"schedule": {"kind": "cron", "expr": "0 8 * * *", "tz": "Europe/Berlin"},
"payload": {"kind": "agentTurn", "message": "Generate morning brief: check emails, calendar, priorities"},
"sessionTarget": "isolated"
}
2. Periodic Health Checks
{
"name": "health-check",
"schedule": {"kind": "every", "everyMs": 3600000},
"payload": {"kind": "systemEvent", "text": "Heartbeat: check system status"},
"sessionTarget": "main"
}
3. Reminder
{
"name": "meeting-reminder",
"schedule": {"kind": "at", "at": "2026-02-20T14:30:00Z"},
"payload": {"kind": "systemEvent", "text": "Reminder: Meeting in 30 minutes"},
"sessionTarget": "main"
}
Job Management
| Action | Command |
|---|---|
| List jobs | cron(action="list") |
| Add job | cron(action="add", job={...}) |
| Update | cron(action="update", jobId="xxx", patch={...}) |
| Remove | cron(action="remove", jobId="xxx") |
| Run now | cron(action="run", jobId="xxx") |
| History | cron(action="runs", jobId="xxx") |
Best Practices
- Use isolated sessions for agentTurn jobs (clean context)
- Set notify=true for user-facing reminders
- Use descriptive names for easy identification
- Test before scheduling — use
run(action="run")first - Review runs periodically — check for failures
Heartbeat vs Cron
| Use | Cron | Heartbeat |
|---|---|---|
| Exact timing | ✅ | ❌ |
| Isolated execution | ✅ | ❌ |
| User reminders | ✅ | ⚠️ |
| Batch checks | ❌ | ✅ |
| Context-dependent | ❌ | ✅ |
Example: Self-Improving Agent Schedule
{
"name": "weekly-learning-review",
"schedule": {"kind": "cron", "expr": "0 10 * * 0", "tz": "Europe/Berlin"},
"payload": {
"kind": "agentTurn",
"message": "Review self-improving-agent learnings. Consolidate to MEMORY.md. Report insights."
},
"sessionTarget": "isolated",
"notify": true
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?