From polydev
Scheduled task automation - Schedule Claude agents to run at specific times using OS-level schedulers (crontab/schtasks). Supports single-run and recurring tasks with full CRUD operations.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-2 --plugin shikihane-polydevThis skill uses the workspace's default tool permissions.
Schedule Claude agents to execute tasks at specific times using OS-level schedulers.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Schedule Claude agents to execute tasks at specific times using OS-level schedulers.
Polycron integrates with your operating system's native scheduler:
When a scheduled time arrives, the OS triggers polycron-trigger.sh, which spawns a Claude agent using spawn-agent.sh to execute the task.
~/.polydev/cron/
├── jobs/
│ ├── <job-id>.json # Job definitions
│ └── ...
└── history.jsonl # Trigger history log
At the start of this session, read the polydev scripts path:
cat ~/.polydev/scripts-path
# Example output: /home/user/.claude/plugins/cache/polydev-marketplace/polydev/1.5.0/scripts
Remember the full absolute path from the output above, then use it directly in all commands.
Example:
# ✓ CORRECT - Use full path directly
/path/to/polydev/scripts/polycron-add.sh daily-report --schedule "0 9 * * *" --prompt "Generate report" --cwd /path/to/project
# ✗ WRONG - Do not use variables
"$POLYDEV_SCRIPTS/polycron-add.sh" ...
Note: If
~/.polydev/scripts-pathdoesn't exist, polydev is not installed.
Script: polycron-add.sh
Syntax:
# Recurring task (cron schedule)
/path/to/polydev/scripts/polycron-add.sh <job-id> \
--schedule "0 9 * * *" \
--prompt "Daily report generation" \
--cwd /path/to/project \
[--type cron] \
[--model sonnet] \
[--report /path/to/report.md]
# Single-run task (specific date/time)
/path/to/polydev/scripts/polycron-add.sh <job-id> \
--at "2026-02-15 10:00" \
--prompt "Deploy to production" \
--cwd /path/to/project \
[--type once] \
[--model sonnet] \
[--report /path/to/report.md]
Parameters:
| Parameter | Required | Description |
|---|---|---|
<job-id> | Yes | Unique identifier for the job |
--schedule | Yes* | Cron schedule (e.g., "0 9 * * *" = 9am daily) |
--at | Yes* | Specific date/time (e.g., "2026-02-15 10:00") |
--prompt | Yes | Task description for Claude agent |
--cwd | Yes | Working directory for the agent |
--type | No | cron (recurring) or once (single-run). Default: cron |
--model | No | Claude model to use. Default: sonnet |
--report | No | Path to save agent output. Default: ~/.polydev/cron/reports/<job-id>.md |
*Either --schedule or --at is required, not both.
Cron Schedule Format:
* * * * *
│ │ │ │ │
│ │ │ │ └─ Day of week (0-7, 0=Sunday)
│ │ │ └─── Month (1-12)
│ │ └───── Day of month (1-31)
│ └─────── Hour (0-23)
└───────── Minute (0-59)
Examples:
# Every day at 9am
--schedule "0 9 * * *"
# Every Monday at 2pm
--schedule "0 14 * * 1"
# Every hour
--schedule "0 * * * *"
# Specific date/time (single-run)
--at "2026-02-15 14:30"
Script: polycron-remove.sh
Syntax:
/path/to/polydev/scripts/polycron-remove.sh <job-id>
Removes the job from OS scheduler and deletes the job definition file.
Script: polycron-list.sh
Syntax:
/path/to/polydev/scripts/polycron-list.sh [--all|--enabled|--disabled]
Filters:
--all: Show all jobs (default)--enabled: Show only enabled jobs--disabled: Show only disabled jobsOutput (TOON format):
jobs{id,schedule,type,enabled,prompt_summary,cwd}:
daily-report,0 9 * * *,cron,True,Generate daily metrics report...,/home/user/project
deploy-prod,30 14 15 2 *,once,False,Deploy to production...,/home/user/app
Script: polycron-history.sh
Syntax:
/path/to/polydev/scripts/polycron-history.sh [job-id] [--last N]
Parameters:
job-id: Optional filter by specific job--last N: Limit output to last N entries (default: 20)Output (TOON format):
history{job_id,triggered_at,pane_id,status}:
daily-report,2026-02-14T09:00:00Z,5,started
daily-report,2026-02-13T09:00:00Z,3,started
polycron-trigger.sh at scheduled timespawn-agent.shhistory.jsonltype=once): Job automatically disabled after execution| Platform | Scheduler | Notes |
|---|---|---|
| Linux/macOS | crontab | Full cron syntax support |
| Windows | schtasks | Basic schedule conversion (daily/once) |
Windows Limitations:
/path/to/polydev/scripts/polycron-add.sh daily-metrics \
--schedule "0 9 * * *" \
--prompt "Generate daily metrics report from logs" \
--cwd /home/user/analytics \
--report /home/user/reports/daily.md
/path/to/polydev/scripts/polycron-add.sh weekly-cleanup \
--schedule "0 2 * * 0" \
--prompt "Clean up old logs and temporary files" \
--cwd /home/user/project
/path/to/polydev/scripts/polycron-add.sh prod-deploy \
--at "2026-02-15 14:00" \
--prompt "Deploy version 2.0 to production" \
--cwd /home/user/app \
--type once
/path/to/polydev/scripts/polycron-list.sh --enabled
/path/to/polydev/scripts/polycron-history.sh --last 10
/path/to/polydev/scripts/polycron-history.sh daily-metrics --last 5
Check OS scheduler:
# Linux/macOS
crontab -l | grep polycron
# Windows
schtasks /Query /TN "polydev-*"
Check job is enabled:
/path/to/polydev/scripts/polycron-list.sh --enabled
Agent output is saved to the report path specified in the job definition (default: ~/.polydev/cron/reports/<job-id>.md).
/path/to/polydev/scripts/polycron-trigger.sh <job-id>
~/.polydev/cron/ directory