Help us improve
Share bugs, ideas, or general feedback.
From claude-code-expert
Schedules recurring prompts or one-time reminders with /loop and cron tools to poll deployments, check builds, review PRs, or set session alerts in Claude Code.
npx claudepluginhub markus41/claude --plugin claude-code-expertHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-expert:scheduled-tasksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Use `/loop` and cron scheduling tools to run prompts repeatedly, poll for status, or set one-time reminders within a Claude Code session.
Schedules Claude Code tasks via native OS schedulers (launchd, crontab, Task Scheduler) from natural language. Handles one-time/recurring jobs with git worktree isolation.
Schedules recurring and one-off tasks via local OS cron (Unix/Windows Task Scheduler) or remote CronCreate/CronDelete/CronList. Use /schedule add/list/remove; prefers local to avoid routine quotas.
Share bugs, ideas, or general feedback.
Use
/loopand cron scheduling tools to run prompts repeatedly, poll for status, or set one-time reminders within a Claude Code session. Requires Claude Code v2.1.72+.
Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to:
Tasks are session-scoped: they live in the current process and are gone when you exit. For durable scheduling, use Cloud, Desktop, or GitHub Actions.
| Cloud | Desktop | /loop | |
|---|---|---|---|
| Runs on | Anthropic cloud | Your machine | Your machine |
| Requires machine on | No | Yes | Yes |
| Requires open session | No | No | Yes |
| Persistent across restarts | Yes | Yes | No |
| Access to local files | No (fresh clone) | Yes | Yes |
| MCP servers | Connectors per task | Config files + connectors | Inherits from session |
| Permission prompts | No (autonomous) | Configurable | Inherits from session |
| Minimum interval | 1 hour | 1 minute | 1 minute |
The quickest way to schedule a recurring prompt:
/loop 5m check if the deployment finished and tell me what happened
| Form | Example | Parsed |
|---|---|---|
| Leading token | /loop 30m check the build | Every 30 minutes |
Trailing every clause | /loop check the build every 2 hours | Every 2 hours |
| No interval | /loop check the build | Default: every 10 minutes |
Units: s (seconds, rounded to nearest minute), m (minutes), h (hours), d (days).
Schedule any command or skill:
/loop 20m /review-pr 1234
Use natural language for single-fire tasks:
remind me at 3pm to push the release branch
in 45 minutes, check whether the integration tests passed
what scheduled tasks do I have?
cancel the deploy check job
| Tool | Purpose |
|---|---|
CronCreate | Schedule new task (5-field cron, prompt, recurrence flag) |
CronList | List all tasks with IDs, schedules, prompts |
CronDelete | Cancel task by ID |
Max 50 tasks per session. Each has an 8-character ID.
Recurring tasks auto-expire after 3 days. Fires one final time, then deletes itself. Recreate before expiry for longer runs, or use Cloud/Desktop for durable scheduling.
5-field format: minute hour day-of-month month day-of-week
| Expression | Meaning |
|---|---|
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour on the hour |
7 * * * * | Every hour at :07 |
0 9 * * * | Daily at 9am local |
0 9 * * 1-5 | Weekdays at 9am local |
30 14 15 3 * | March 15 at 2:30pm local |
Day-of-week: 0/7 = Sunday through 6 = Saturday. No extended syntax (L, W, ?, name aliases).
Scheduled tasks are powerful for build and deployment monitoring:
/loop 2m check the deployment status of staging and report any failures
/loop 5m check if CI pipeline #1234 has completed. If it failed, analyze the logs and suggest fixes
/loop 10m check PR #456 for new review comments and CI status changes
/loop 1m curl the /health endpoint and alert me if it returns non-200
Set CLAUDE_CODE_DISABLE_CRON=1 to disable the scheduler entirely. Tools and /loop become unavailable.
Cloud tasks run on Anthropic's infrastructure without your machine. They get a fresh repo clone via GitHub connector.
Minimum interval: 1 hour. No local files. Requires connector per task.
# Create via API
POST https://api.anthropic.com/v1/scheduled_tasks
{
"name": "Weekly dep audit",
"schedule": "0 8 * * 1",
"model": "claude-sonnet-4-6",
"prompt": "Audit npm dependencies for vulnerabilities...",
"connectors": [{ "type": "github", "repo": "owner/repo" }]
}
Best for: Nightly/weekly jobs that run unattended. GitHub-native workflows. Tasks that must survive machine off.
Desktop tasks run on your local machine via the Claude Desktop app. Full local file + MCP access. Require Desktop open.
Minimum interval: 1 minute. Full local access. Config files + connectors.
In Claude Desktop → Settings → Scheduled Tasks → New Task
Name: Daily PR Review
Schedule: 0 9 * * 1-5
Prompt: {your prompt}
Working directory: /path/to/repo
Best for: Daily dev workflows, tasks needing local filesystem, git, or local MCP servers.
/cc-schedule generates optimized, guardrailed prompts for 6 common maintenance workflows, pre-configured for each target:
/cc-schedule pr-review --target desktop # Daily PR review → Desktop task
/cc-schedule ci-triage --target loop # CI triage → /loop command
/cc-schedule dep-audit --target cloud # Dep audit → Cloud task
/cc-schedule docs-drift # Docs drift check
/cc-schedule release-check # Release readiness
/cc-schedule branch-hygiene # Branch cleanup
Each blueprint includes skip conditions, guardrails, branch naming policy, and a verification block. See commands/cc-schedule.md for full specifications.
Every effective scheduled prompt needs these four sections:
SKIP CONDITIONS:
- If [condition], output "[message]" and stop.
STEPS:
1. [action]
2. [action]
GUARDRAILS:
- Never [dangerous action]
- Maximum [N] operations per run
VERIFICATION:
Output: {N} items processed, {M} actions taken, {K} skipped.
Why: Without skip conditions, tasks run wastefully. Without guardrails, autonomous tasks cause incidents.