a851cedd71
- Add Best Practice badges: Voice Mode, Agent Teams, Simplify & Batch - Add Implemented badge + implementation doc for Scheduled Tasks (/loop) - Add Simplify & Batch row to Hot table - Add AskUserQuestion + ASCII Markdowns to Boris section - Karpathy: link to tweet instead of GitHub, remove stars, re-sort Others Co-Authored-By: Claude <noreply@anthropic.com>
1.9 KiB
1.9 KiB
Scheduled Tasks Implementation
| ← Back to Claude Code Best Practice |
The /loop skill is used to schedule recurring tasks on a cron interval. Below is a demo of /loop 1m "tell current time" — a simple recurring task that fires every minute.
Loop Demo
1. Scheduling the Task
/loop 1m "tell current time" parses the interval (1m → every 1 minute), creates a cron job, and confirms the schedule. Key notes:
- Cron's minimum granularity is 1 minute —
1mmaps to*/1 * * * * - Recurring tasks auto-expire after 3 days
- Jobs are session-scoped — they live in memory only and stop when Claude exits
- Cancel anytime with
cron cancel <job-id>
2. Loop in Action
The task fires every minute, running date and reporting the current time. Each iteration triggers async UserPromptSubmit and Stop hooks — the same hook system used throughout this repo for sound notifications.
$ claude
> /loop 1m "tell current time"
> /loop 5m /simplify
> /loop 10m "check deploy status"
/loop is a built-in Claude Code skill — no setup required. It uses the cron tools (CronCreate, CronList, CronDelete) under the hood to manage recurring schedules.

