cron-decision
БесплатноЗапускает вложенные скриптыНе проверенDecision framework for agents to determine WHEN and WHETHER to use Claude Code's native cron scheduler (CronCreate/CronList/CronDelete) vs OS cron, GitHub…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Cron Decision Skill
Official docs: https://code.claude.com/docs/en/scheduled-tasks
Purpose
Help agents decide when and whether to use Claude Code's native cron scheduler (CronCreate/CronList/CronDelete) versus alternatives like OS cron (crontab), GitHub Actions scheduled workflows, or simple one-shot Task() delegation.
Using the wrong scheduling mechanism leads to:
- Silent task loss (session expiry kills CronCreate tasks)
- Missed precision requirements (CronCreate has up to 15-min jitter)
- Over-engineering (using GitHub Actions for a simple session heartbeat)
Quick Checklist (Run Before Any Scheduling Decision)
Answer these 5 questions in order. The FIRST "yes" that hits a stop condition determines your tool.
Is the task a one-time operation?
- YES → Use
TaskCreateorTask(). Stop here. CronCreate is for recurring work only.
- YES → Use
Must the task survive terminal/session close?
- YES → Use OS cron (
crontab -e) or GitHub Actions. CronCreate is session-scoped and dies when Claude Code closes.
- YES → Use OS cron (
Does the task require sub-15-minute precision or hard time guarantees?
- YES → Use OS cron or GitHub Actions. CronCreate fires with up to 10% jitter (max 15 min).
Is this a heartbeat loop or session-scoped health check?
- YES → Use CronCreate. This is its primary intended use case.
Is this triggered by an event rather than a clock?
- YES → Use a hook (PreToolUse/PostToolUse) or an event listener, not a scheduler at all.
Decision Matrix
| Scenario | Recommended Tool | Reason |
|---|---|---|
| Periodic background monitoring during active session | CronCreate |
Session-scoped is fine; this is CronCreate's primary use case |
| Agent ecosystem heartbeat (health checks, memory sizes) | CronCreate via heartbeat-orchestrator |
Use dedicated orchestrator, not raw CronCreate |
| One-time task (now or delayed) | Task() or TaskCreate |
Cron is for recurring work only |
| Nightly backup or data pipeline | OS cron (crontab -e) |
Must survive terminal close |
| CI/CD pipeline trigger | GitHub Actions schedule: |
Cloud-run, no terminal dependency |
| Data refresh every 4 hours during development | CronCreate |
Session-scoped is acceptable for dev workflows |
| Production scheduled job | OS cron or GitHub Actions | Never rely on session-scoped for production |
| Event-driven reaction (file change, hook trigger) | Hook (PreToolUse/PostToolUse) | Time-based scheduler is wrong tool for events |
| User-requested one-off analysis | Task() |
Single execution, no recurrence needed |
| Weekly report generation (must run unattended) | GitHub Actions | Unattended, cloud-run, persistent |
| Session index rebuild during development | CronCreate |
Session-scoped is fine; fires while Claude is open |
| Reflection queue drain check | CronCreate via heartbeat-orchestrator |
Part of heartbeat ecosystem |
Heartbeat Integration Note
If the recurring task is agent ecosystem monitoring (health checks, memory rotation, stuck task detection, reflection queue), do not use raw CronCreate directly.
Instead, delegate to heartbeat-orchestrator or invoke the /heartbeat-start command:
// CORRECT: Delegate heartbeat ecosystem to the dedicated orchestrator
// Router: spawn heartbeat-orchestrator agent
// OR user: /heartbeat-start
// WRONG: Manually wiring raw CronCreate for ecosystem health
CronCreate({
schedule: '*/30 * * * *',
task: 'Check agent health...',
});
The heartbeat-orchestrator manages:
- All 7 heartbeat loops
- Auto-reschedule (prevents silent 3-day expiry)
- Session restart detection and re-registration
- Coordinated observability via
heartbeat-session-ping.json
Exception: Use raw CronCreate only for custom, non-ecosystem recurring tasks that are not part of the standard heartbeat loops.
CronCreate Constraints (Critical
Установить cron-decision в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
CronCreateCronListCronDeleteTaskCreateReadBashВложенные файлы
FAQ
Что делает скилл cron-decision?
Decision framework for agents to determine WHEN and WHETHER to use Claude Code's native cron scheduler (CronCreate/CronList/CronDelete) vs OS cron, GitHub Actions, or simple Task() delegation.
Как установить скилл cron-decision?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cron-decision запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic