.claude/skills/cron-decision/SKILL.md
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.
npx skillsauth add oimiragieo/agent-studio cron-decisionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Official docs: https://code.claude.com/docs/en/scheduled-tasks
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:
Answer these 5 questions in order. The FIRST "yes" that hits a stop condition determines your tool.
Is the task a one-time operation?
TaskCreate or Task(). Stop here. CronCreate is for recurring work only.Must the task survive terminal/session close?
crontab -e) or GitHub Actions. CronCreate is session-scoped and dies when Claude Code closes.Does the task require sub-15-minute precision or hard time guarantees?
Is this a heartbeat loop or session-scoped health check?
Is this triggered by an event rather than a clock?
| 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 |
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:
heartbeat-session-ping.jsonException: Use raw CronCreate only for custom, non-ecosystem recurring tasks that are not part of the standard heartbeat loops.
| Constraint | Detail |
| ---------------------- | -------------------------------------------------------------- |
| Session-scoped | Dies when terminal closes — no persistence across restarts |
| 3-day auto-expiry | Self-deletes silently after 3 days (reschedule before day 2.5) |
| Jitter | Fires up to 10% of period late (max 15 min) |
| No catch-up | Missed fires are NOT replayed |
| 50-task cap | Max 50 concurrent scheduled tasks per session |
| Fire-between-turns | Fires only when Claude is idle, not mid-response |
| No extended syntax | L, W, ?, MON-style names are NOT supported |
CronCreate whencrontab -e) whenschedule: whenTask() or TaskCreate when// Schedule a recurring task (standard 5-field cron expression)
CronCreate({ schedule: '*/30 * * * *', task: 'Heartbeat check prompt here' });
// List active cron tasks (verify what is registered)
CronList();
// Remove a scheduled task by ID
CronDelete({ id: 'abc12345' });
Common schedules:
| Expression | Meaning |
| -------------- | ------------------------------------- |
| */30 * * * * | Every 30 minutes |
| */5 * * * * | Every 5 minutes (minimum recommended) |
| 0 * * * * | Every hour on the hour |
| 0 2 * * * | Every day at 2am local time |
| 0 3 * * 0 | Every Sunday at 3am |
Skill({ skill: 'cron-decision' });
Invoke before:
Do NOT invoke for:
TaskCreate directly)heartbeat-orchestrator or /heartbeat-start)scheduled-tasks — Full CronCreate implementation reference with heartbeat patternsheartbeat — Start the full 7-loop heartbeat ecosystemheartbeat-orchestrator agent — Manages ecosystem heartbeat loopsBefore starting:
Read .claude/context/memory/learnings.md for previous scheduling decisions.
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.