scheduled-tasks
БесплатноЗапускает вложенные скриптыНе проверенSchedule recurring tasks and heartbeat monitoring using Claude Code's cron system (CronCreate/CronList/CronDelete). Implements the Agentic Heartbeat Pattern…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Scheduled Tasks & Heartbeat Skill
Official docs: https://code.claude.com/docs/en/scheduled-tasks
Primary Interface: /loop Slash Command
The primary user-facing way to invoke scheduled tasks is via the /loop command. This is the
recommended interface for most users.
Syntax
/loop <interval> <prompt> # interval-based
/loop every 5m <prompt> # explicit "every" syntax
/loop 2h <prompt> # shorthand hours
/loop at 8:00am <prompt> # time-based (daily at local time)
Common Intervals
2m, 5m, 10m, 15m, 30m # minutes
1h, 2h, 4h, 6h, 12h # hours
at 8:00am, at 3:00pm # daily time triggers (local timezone)
Examples
/loop 5m Check for new Telegram messages and reply
/loop 2h Distill recent session learnings into .claude/context/memory/learnings.md
/loop at 8:00am Read issues.md and CHANGELOG.md and give morning briefing
/loop every 4h Run pnpm search:code "indexing" to refresh codebase index
/loop 30m Heartbeat: read agent-health.json, check memory sizes, TaskList for stuck tasks
Chaining: Run a Slash Command on a Schedule
/loop 20m /review-pr 1234 # run a slash command on a schedule
/loop 2h /heartbeat-start # restart heartbeat ecosystem every 2 hours
Key Behaviors
| Behavior | Detail |
|---|---|
| Jitter | Tasks fire up to 10% of their period late (max 15 min) — avoids stampedes |
| No catch-up | Missed fires are NOT replayed after sleep/hibernation |
| Session-scoped | Loops stop automatically when the Claude Code session ends |
| Local timezone | at HH:MMam/pm triggers use local time, not UTC |
| Max 50 loops | Hard cap of 50 concurrent scheduled tasks per session |
| 3-day expiry | All loops silently self-delete 3 days after creation (reschedule before day 2.5) |
| Fire-between-turns | Tasks fire only when Claude is idle, not mid-response |
Heartbeat OS Pattern
Use /loop to build a self-improving agent ecosystem that runs continuously in the background:
Continuous Reflection (every 2h)
/loop 2h Read .claude/context/memory/issues.md and recent session context. Extract patterns, workarounds, and decisions. Append to learnings.md and decisions.md.
Autonomous Evolution (daily at 3am)
/loop at 3:00am Review learnings.md and test failures. Use agent-updater skill to improve agent .md files. Run pnpm validate:full before finalizing.
Morning Briefing (weekdays at 8am)
/loop at 8:00am Read CHANGELOG.md and issues.md. Summarize technical debt, flaky tests, and top 2 tasks for today.
Context Drain (every 15m)
/loop 15m Check if all tasks are done. If TaskList shows zero in_progress tasks, summarize session to memory and surface readiness for /clear to user.
Codebase Indexing (every 4h)
/loop 4h Run pnpm code:index:reindex to refresh the BM25 and semantic search index.
Start the Full Heartbeat Ecosystem
Use /heartbeat-start to launch all 7 loops in one command. See .claude/commands/heartbeat-start.md.
Overview
Provides patterns for scheduling recurring tasks using Claude Code's built-in cron system (CronCreate/CronList/CronDelete). Also implements the Agentic Heartbeat Pattern for keeping the agent ecosystem healthy.
Core distinction:
- Cron tasks: "Run this SPECIFIC task at 3am Tuesday" — deterministic, time-anchored maintenance
- Heartbeat: "Check in periodically; act IF something needs attention" — awareness-based, conditional liveness
Decision Framework: When to Use Cron
Quick Decision Checklist (run through before calling CronCreate)
- Is the task recurring? If NO → use
TaskCreateinstead (cron is for recurring work only). - Can it tolerate up to 15-minute jitter? If NO → use OS cron or GitHub Actions (CronCreate has built-in jitter).
- Is it acceptable to lose it on terminal close? If NO → use OS cron (
crontab -e) or GitHub Actions for persistence. - Will it complete within the session? If the session may end before the task fires → prefer OS-level scheduling.
- Is it for monitoring/health checks? If YES → CronCreate is the right tool (this is its primary use case).
- Are there 10+ other cron tasks already scheduled? If YES → reconsider; stay under 10 concurrent tasks (50-cap headroom).
Decision Tree
Need a recurring task?
├── NO → Use TaskCreate (one-shot) or Task()
└── YES
├── Must survive terminal close?
│ ├── YES → Use OS cron (crontab -e) or GitHub Actions
│ └── NO (ses
Установить scheduled-tasks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
[CronCreateCronListCronDeleteReadBashTaskCreateTaskUpdateTaskListMemoryRecord]Вложенные файлы
FAQ
Что делает скилл scheduled-tasks?
Schedule recurring tasks and heartbeat monitoring using Claude Code's cron system (CronCreate/CronList/CronDelete). Implements the Agentic Heartbeat Pattern for ecosystem health monitoring.
Как установить скилл scheduled-tasks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scheduled-tasks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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