plugins/claude-code-expert/skills/scheduled-tasks/SKILL.md
# Scheduled Tasks > Use `/loop` and 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+. ## Overview Scheduled tasks let Claude re-run a prompt automatically on an interval. Use them to: - Poll a deployment status - Babysit a PR review cycle - Check on a long-running build - Set reminders during a session Tasks are **session-scoped**: they live in the current process and are gone when you ex
npx skillsauth add markus41/claude plugins/claude-code-expert/skills/scheduled-tasksInstall 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.
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.
tools
Build Teams-native agents with the Teams SDK (formerly Teams AI Library v2) — App class, activity routing, adaptive cards, streaming, AI-generated labels, feedback, message extensions, Teams-as-MCP-server, and the bring-your-own-AI pattern with Agent Framework.
tools
Run agents on Microsoft Foundry (formerly Azure AI Foundry) Agent Service — prompt agents vs hosted agents, threads/runs and the Responses API, built-in tools (Bing grounding, code interpreter, file search, MCP, OpenAPI, A2A), connected agents, Entra agent identity, SDKs, and observability/evaluations.
tools
Build and host custom engine agents with the Microsoft 365 Agents SDK — AgentApplication, the Activity protocol, channel reach via Azure Bot Service, hosting Agent Framework or Semantic Kernel engines, and the Agents Toolkit/Playground workflow. Successor to the Bot Framework SDK.
tools
Design, govern, and extend Microsoft Copilot Studio agents — topics, generative orchestration, knowledge, tools and MCP, agent flows, autonomous triggers, publishing channels, Copilot Credits pricing, and solution-based ALM on Power Platform.