跳到正文
TakoAPI
返回技能列表

cron-scheduling

由 gitgoodordietrying 提供

Calendar & Scheduling
6.4k下载量由 clawskills.sh 提供
4星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Schedule and manage recurring tasks with cron.

描述

该技能的功能

Covers cron syntax, crontab management, systemd timer units, one-off scheduling with `at`, timezone handling, and job failure debugging. Works on Linux and macOS systems with `crontab`, `systemctl`, or `at` available.

Systemd timers provide journald logging, missed-run catchup, and resource limits that cron lacks, and this skill covers both so you can choose the right tool for the context.

何时使用

  • Scheduling nightly database backups
  • Setting up a weekly log cleanup job
  • Debugging why a cron job silently stopped running
  • Migrating cron jobs to systemd timers
  • Running a deploy script once at a specific future time

示例工作流

输入

User asks: set up a daily backup job at 2 AM using systemd timers

智能体
  1. 1

    Creates /etc/systemd/system/backup.service with Type=oneshot and ExecStart pointing to the backup script

  2. 2

    Creates /etc/systemd/system/backup.timer with OnCalendar=*-*-* 02:00:00 and Persistent=true

  3. 3

    Runs systemctl daemon-reload and systemctl enable --now backup.timer

  4. 4

    Verifies the timer appears in systemctl list-timers output

  5. 5

    Confirms next trigger time with systemd-analyze calendar "*-*-* 02:00:00"

输出

Timer is active and scheduled; next run shown with exact trigger timestamp

安装

clawhub install gitgoodordietrying/cron-scheduling

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接