cron
GitHub用于管理 DotCraft 定时任务,支持添加、列出和删除。涵盖一次性延迟、周期性间隔及每日固定时间三种调度模式,配置结果投递目标,并提供常见验证错误的恢复指南。
Trigger Scenarios
Install
npx skills add DotHarness/dotcraft --skill cron -g -y
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
- Choose
action:add,list, orremove. - For
add, always includescheduleKind. - Keep the schedule fields for the selected kind readable; ignore unrelated auto-filled schedule fields because
scheduleKindis authoritative. - Use
listbeforeremovewhen 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 withat,every, ordaily. scheduleKind: "at"requires a positivedelaySeconds.scheduleKind: "every"requires a positiveeverySeconds;delaySecondsis only the first-run delay.scheduleKind: "daily"requiresdailyTimeordailyHour;dailyMinutedefaults to0.- Daily time zones should be IANA ids such as
Asia/Hong_Kong; omitted means UTC.
Version History
- f8e839e Current 2026-07-05 15:31


