cron

GitHub

用于调度、列出、移除或排查 DotCraft 定时任务。支持一次性延迟、周期性间隔和每日固定时间三种调度模式,可配置结果投递及处理验证错误。

src/DotCraft.Core/Skills/BuiltIn/cron/SKILL.md DotHarness/dotcraft

Trigger Scenarios

用户需要设置未来的提醒或定时执行任务 用户希望定期检查状态或重复执行某项操作 用户需要查看当前已注册的定时任务列表 用户想要取消或删除某个已存在的定时任务

Install

npx skills add DotHarness/dotcraft --skill cron -g -y
More Options

Non-standard path

npx skills add https://github.com/DotHarness/dotcraft/tree/main/src/DotCraft.Core/Skills/BuiltIn/cron -g -y

Use without installing

npx skills use DotHarness/dotcraft@cron

指定 Agent (Claude Code)

npx skills add DotHarness/dotcraft --skill cron -a claude-code -g -y

安装 repo 全部 skill

npx skills add DotHarness/dotcraft --all -g -y

预览 repo 内 skill

npx skills add DotHarness/dotcraft --list

SKILL.md

Frontmatter
{
    "name": "cron",
    "description": "Use when scheduling, listing, removing, or troubleshooting DotCraft Cron jobs with the Cron tool; choose scheduleKind at, every, or daily, set required schedule fields, configure delivery, and recover from Cron validation errors."
}

Cron

Use Cron for scheduled background agent runs that should happen later or repeatedly. Do not use it for a short blocking wait inside the current turn.

Workflow

  1. Choose action: add, list, or remove.
  2. For add, always include scheduleKind.
  3. Keep the schedule fields for the selected kind readable; ignore unrelated auto-filled schedule fields because scheduleKind is authoritative.
  4. Use list before remove when you do not know the job id.

Add Jobs

Kind Required fields Optional fields Use for
at message, delaySeconds name, deliver, channel, toUser One-time delay jobs
every message, everySeconds delaySeconds, name, deliver, channel, toUser Recurring interval jobs
daily message, dailyTime or dailyHour dailyMinute, timeZone, name, deliver, channel, toUser Fixed local clock time jobs

Examples:

Cron(action: "add", scheduleKind: "at", message: "Remind me to check the build", delaySeconds: 600)
Cron(action: "add", scheduleKind: "every", message: "Summarize CI status", everySeconds: 3600)
Cron(action: "add", scheduleKind: "every", message: "Ping service", everySeconds: 3600, delaySeconds: 300)
Cron(action: "add", scheduleKind: "daily", message: "Prepare standup notes", dailyTime: "09:30", timeZone: "Asia/Hong_Kong")

Delivery

By default, deliver is true and DotCraft sends the run result back to the creator's current channel or session target. Set deliver: false only when the job should update state without notifying the user. Use channel and toUser only when the user explicitly wants a different delivery target.

List And Remove

Cron(action: "list")
Cron(action: "remove", jobId: "abc12345")

Validation Recovery

  • Missing scheduleKind: retry with at, every, or daily.
  • scheduleKind: "at" requires a positive delaySeconds.
  • scheduleKind: "every" requires a positive everySeconds; delaySeconds is only the first-run delay.
  • scheduleKind: "daily" requires dailyTime or dailyHour; dailyMinute defaults to 0.
  • Daily time zones should be IANA ids such as Asia/Hong_Kong; omitted means UTC.

Version History

  • f8e839e Current 2026-07-05 15:31

Same Skill Collection

src/DotCraft.Core/Skills/BuiltIn/create-hooks/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/heartbeat/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/memory/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/plugin-creator/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/skill-authoring/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/skill-installer/SKILL.md
src/DotCraft.Core/Skills/BuiltIn/visualize/SKILL.md

Metadata

Files
0
Version
ffac645
Hash
0d254aa0
Indexed
2026-07-05 15:31

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-26 00:42
浙ICP备14020137号-1 $お客様$