Create, list, modify, and remove scheduled cron jobs to automate system tasks using simplified cron syntax and manage output logging.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install cron-scheduler或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install cron-scheduler⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/cron-scheduler/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
Manage scheduled tasks and automation on your system using cron.
Category: automation, productivity API Key Required: No
Create, manage, and monitor scheduled tasks (cron jobs) on your machine. Automate backups, health checks, cleanup scripts, API calls, notifications — anything that should run on a schedule. Your agent handles the cron syntax so you don't have to.
echo "=== User crontab ==="
crontab -l 2>/dev/null || echo "(empty)"
echo ""
echo "=== System cron ==="
ls /etc/cron.d/ 2>/dev/null
echo ""
echo "=== Cron directories ==="
echo "Hourly: $(ls /etc/cron.hourly/ 2>/dev/null | wc -l) jobs"
echo "Daily: $(ls /etc/cron.daily/ 2>/dev/null | wc -l) jobs"
echo "Weekly: $(ls /etc/cron.weekly/ 2>/dev/null | wc -l) jobs"
echo "Monthly: $(ls /etc/cron.monthly/ 2>/dev/null | wc -l) jobs"
# Add to user crontab
(crontab -l 2>/dev/null; echo "SCHEDULE COMMAND") | crontab -
# Common schedules:
# Every minute: * * * * *
# Every 5 minutes: */5 * * * *
# Every hour: 0 * * * *
# Every day at 2am: 0 2 * * *
# Every Monday 9am: 0 9 * * 1
# Every 1st of month: 0 0 1 * *
# Weekdays at 8am: 0 8 * * 1-5
# Edit crontab interactively
crontab -e
# Or remove a specific line
crontab -l | grep -v "PATTERN_TO_REMOVE" | crontab -
# Recent cron activity
grep CRON /var/log/syslog | tail -20
# Or on systems using journald
journalctl -u cron --since "1 hour ago" --no-pager | tail -20
# Run the command manually first to make sure it works
COMMAND_HERE
# Check it produces expected output
echo "Exit code: $?"
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * * command
# Disk space alert daily at 8am
0 8 * * * df -h / | awk 'NR==2 && $5+0 > 80 {print "Disk alert: " $5 " used"}' | mail -s "Disk Warning" [email protected]
# Clean /tmp weekly
0 3 * * 0 find /tmp -type f -mtime +7 -delete
# Backup database nightly
0 2 * * * pg_dump mydb > /backups/db_$(date +\%Y\%m\%d).sql
# Restart a service if it crashes (every 5 min check)
*/5 * * * * systemctl is-active myservice || systemctl restart myservice
# Log system stats every 15 minutes
*/15 * * * * echo "$(date): $(uptime)" >> /var/log/system-stats.log
# Cron runs with minimal environment. Set what you need:
(crontab -l 2>/dev/null; echo "PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash
0 2 * * * /home/user/backup.sh >> /var/log/backup.log 2>&1") | crontab -
# Log output
* * * * * command >> /var/log/myjob.log 2>&1
# Discard output
* * * * * command > /dev/null 2>&1
# Email output (if mail is configured)
[email protected]
0 8 * * * command
User: "Run my backup script every night at 2am" → (crontab -l 2>/dev/null; echo "0 2 * /home/user/backup.sh >> /var/log/backup.log 2>&1") | crontab -
User: "Check disk space every hour and alert me if it's over 80%" → Create a check script + cron job
User: "What scheduled tasks are running?" → List all crontabs and system cron directories
User: "Stop the daily cleanup job" → Find and remove the specific cron entry
timedatectl安装 Cron Scheduler 后,可以对 AI 说这些话来触发它
Help me get started with Cron Scheduler
Explains what Cron Scheduler does, walks through the setup, and runs a quick demo based on your current project
Use Cron Scheduler to create, list, modify, and remove scheduled cron jobs to automate sy...
Invokes Cron Scheduler with the right parameters and returns the result directly in the conversation
What can I do with Cron Scheduler in my developer & devops workflow?
Lists the top use cases for Cron Scheduler, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/cron-scheduler/ 目录(个人级,所有项目可用),或 .claude/skills/cron-scheduler/(项目级)。重启 AI 客户端后,用 /cron-scheduler 主动调用,或让 AI 根据上下文自动发现并使用。
Cron Scheduler 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Cron Scheduler 可免费安装使用。请查阅仓库了解许可证信息。
Create, list, modify, and remove scheduled cron jobs to automate system tasks using simplified cron syntax and manage output logging.
Cron Scheduler 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Cron Scheduler
Identifies repetitive steps in your workflow and sets up Cron Scheduler to handle them automatically