openclaw-cron
OpenClaw Cron Manager
Safe management of OpenClaw cron jobs without touching configuration files.
Quick Start
List all cron jobs
openclaw cron list
Add a new cron job
openclaw cron add \
--name "任务名称" \
--cron "0 9 * * 1" \
--tz "Asia/Shanghai" \
--agent main \
--message "任务描述" \
--announce \
--channel telegram \
--to "telegram:YOUR_CHAT_ID"
Test run immediately
openclaw cron run <job-id>
Disable/Enable a job
openclaw cron disable <job-id>
openclaw cron enable <job-id>
Common Patterns
Daily task (every day at 9 AM)
openclaw cron add \
--name "每日检查" \
--cron "0 9 * * *" \
--tz "Asia/Shanghai" \
--agent main \
--message "执行每日检查任务" \
--announce
Weekly task (every Monday at 9 AM)
openclaw cron add \
--name "周报" \
--cron "0 9 * * 1" \
--tz "Asia/Shanghai" \
--agent main \
--message "生成周报" \
--announce
Hourly task
openclaw cron add \
--name "每小时检查" \
--every "1h" \
--agent main \
--message "执行小时检查"
One-time task (run once after 20 minutes)
openclaw cron add \
--name "提醒" \
--at "+20m" \
--agent main \
--message "20分钟后的提醒" \
--delete-after-run \
--announce
Cron Expression Guide
Format: minute hour day month weekday
Examples:
0 9 * * *- Every day at 9:00 AM0 9 * * 1- Every Monday at 9:00 AM0 */2 * * *- Every 2 hours30 8 * * 1-5- Weekdays at 8:30 AM0 0 1 * *- First day of every month at midnight
Shortcuts:
--every "10m"- Every 10 minutes--every "1h"- Every hour--every "1d"- Every day--at "+20m"- Once, 20 minutes from now--at "2026-03-02T09:00:00"- Once, at specific time
Key Options
Scheduling
--cron <expr>- Cron expression (5-field)--every <duration>- Interval (e.g., 10m, 1h, 1d)--at <when>- One-time: ISO timestamp or +duration--tz <iana>- Timezone (default: system, e.g., Asia/Shanghai)
Agent & Session
--agent <id>- Which agent runs the task (default: main)--session <target>- Session type:mainorisolated(default: isolated)--model <model>- Model override for this job
Delivery
--announce- Send result summary to chat--channel <channel>- Delivery channel (telegram, whatsapp, etc.)--to <dest>- Destination (e.g., telegram:123456)--no-deliver- Don't send any notifications
Task Content
--message <text>- Message for agent to process--system-event <text>- System event payload
Behavior
--disabled- Create job disabled (enable later)--delete-after-run- Auto-delete after one-time job succeeds--timeout-seconds <n>- Task timeout (default: 30)--thinking <level>- Thinking level: off/minimal/low/medium/high
Management Commands
List jobs
# List all jobs
openclaw cron list
# List with JSON output
openclaw cron list --json
View job details
openclaw cron status
Run job immediately (testing)
openclaw cron run <job-id>
View run history
openclaw cron runs <job-id>
Edit job
openclaw cron edit <job-id> --name "新名称"
openclaw cron edit <job-id> --cron "0 10 * * *"
openclaw cron edit <job-id> --disabled
Enable/Disable
openclaw cron disable <job-id>
openclaw cron enable <job-id>
Delete job
openclaw cron rm <job-id>
Real-World Examples
ClawHub Skills Discovery (Weekly)
openclaw cron add \
--name "ClawHub Skills 周报" \
--cron "0 9 * * 1" \
--tz "Asia/Shanghai" \
--agent main \
--message "请检查 ClawHub 上的新 skills 并推荐给我。使用 clawhub search 命令搜索不同类别的 skills。" \
--announce \
--channel telegram \
--to "telegram:5223431061"
Daily Backup
openclaw cron add \
--name "每日备份" \
--cron "0 2 * * *" \
--tz "Asia/Shanghai" \
--agent main \
--message "创建 OpenClaw 配置备份并推送到 GitHub" \
--announce
GitHub Activity Report (Daily)
openclaw cron add \
--name "GitHub 日报" \
--cron "0 17 * * *" \
--tz "Asia/Shanghai" \
--agent main \
--message "总结今天的 GitHub 活动:commits, PRs, issues" \
--announce \
--channel telegram
Reminder (One-time)
openclaw cron add \
--name "会议提醒" \
--at "+30m" \
--agent main \
--message "30分钟后有会议" \
--delete-after-run \
--announce
Best Practices
✅ Do
- Use
--announcefor tasks that should notify you - Set timezone with
--tzfor cron expressions - Test first with
openclaw cron run <id>before enabling - Use isolated sessions (default) for independent task execution
- Set reasonable timeouts with
--timeout-seconds - Use descriptive names for easy identification
❌ Don't
- Don't edit
openclaw.jsondirectly - Use CLI commands - Don't create too many frequent tasks - Combine related checks
- Don't forget timezone - Default may not match your location
- Don't use
mainsession unless you need conversation context - Don't skip testing - Always test with
cron runfirst
Troubleshooting
Job not running:
- Check if enabled:
openclaw cron list - Check next run time
- Verify timezone setting
- Test manually:
openclaw cron run <id>
Job fails:
- Check run history:
openclaw cron runs <id> - Verify agent exists
- Check timeout settings
- Test message manually in chat
Wrong schedule:
- Verify cron expression: https://crontab.guru
- Check timezone setting
- Edit schedule:
openclaw cron edit <id> --cron "..."
Reference
Cron Expression Syntax
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday=0)
│ │ │ │ │
* * * * *
Common Timezones
Asia/Shanghai- China (UTC+8)America/New_York- US EasternEurope/London- UKUTC- Universal Time
Duration Format
s- seconds (e.g.,30s)m- minutes (e.g.,10m)h- hours (e.g.,2h)d- days (e.g.,1d)
See Also
- Official docs: https://docs.openclaw.ai/cli/cron
- Cron expression tester: https://crontab.guru
- Timezone list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
More from liuzln/openclaw-skills
wechat-article-fetcher
Fetch and save WeChat Official Account articles with full content and images. Supports any WeChat article URL, automatic image download, JSON export, and full-page screenshots. Use when you need to archive, save, or analyze WeChat Official Account articles.
58openclaw-backup
Backup and restore OpenClaw configuration and important data. Use when the user wants to create a backup before making changes, restore from a previous backup, list available backups, or protect their OpenClaw setup. Backs up openclaw.json, agents configuration, workspace files, memory, and custom skills.
3openclaw-config
Complete OpenClaw agent and configuration management. Use when the user wants to create new agents, configure Telegram bots, set up message routing with bindings, manage multi-agent configurations, list current setup, or troubleshoot routing issues. Handles agent creation, binding management, and configuration based on official OpenClaw documentation.
2x-tweet-fetcher
Fetch and save X (Twitter) tweets with full content, screenshots, and JSON export. Supports single tweets, user timelines, and automatic screenshot capture. Use when you need to archive, save, or analyze X tweets.
2skill-publisher
Publish and share OpenClaw skills to GitHub repositories. Use when the user wants to share skills, create a skills collection repository, add skills to an existing repository, or manage skill sharing workflows. Automates repository creation, skill addition, README updates, and git operations.
2vercel-deploy
Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Create a preview deployment", "Deploy and give me the link", or "Push this live". No authentication required - returns preview URL and claimable deployment link.
2