Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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.

  1. Is the task a one-time operation?

    • YES → Use TaskCreate or Task(). Stop here. CronCreate is for recurring work only.
  2. 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.
  3. 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).
  4. Is this a heartbeat loop or session-scoped health check?

    • YES → Use CronCreate. This is its primary intended use case.
  5. 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

Полный SKILL.md на GitHub

Установить cron-decision в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

CronCreate
CronList
CronDelete
TaskCreate
Read
Bash

Вложенные файлы

commands/cron-decision.mdhooks/post-execute.cjshooks/pre-execute.cjsreferences/research-requirements.mdrules/cron-decision.mdschemas/input.schema.jsonschemas/output.schema.jsonscripts/main.cjstemplates/implementation-template.md

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить cron-decision с