Add a new scheduled task (Claude prompt or script) to run on a cron schedule
From opspal-corenpx claudepluginhub revpalsfdc/opspal-commercial --plugin opspal-core[--name=NAME --type=TYPE --schedule=CRON --prompt=PROMPT|--command=CMD]/schedule-addInteractively creates one-time or recurring scheduled tasks for executing Claude commands in the project, registering with native schedulers like launchd, cron, or schtasks.
Add a new task to run Claude Code prompts or scripts on a cron schedule.
Simply run /schedule-add and I'll guide you through the configuration.
/schedule-add --name="Task Name" --type=claude-prompt --schedule="0 6 * * *" --prompt="Your prompt here"
| Parameter | Required | Description |
|---|---|---|
--name | Yes | Human-readable task name |
--type | Yes | claude-prompt, script, or hybrid |
--schedule | Yes | Cron expression (5 fields) |
--prompt | For claude-prompt | The prompt to run via claude -p |
--command | For script/hybrid | The bash/node command to execute |
--timeout | No | Timeout in seconds (default: 600) |
--notify-on | No | failure, completion, or both (comma-separated) |
--working-dir | No | Working directory for execution |
claude-promptRuns a prompt via claude -p "prompt" --dangerously-skip-permissions
/schedule-add --name="Daily Health Check" \
--type=claude-prompt \
--schedule="0 6 * * *" \
--prompt="Check Salesforce API limits and report any issues"
scriptRuns a bash or node script directly
/schedule-add --name="Weekly Backup" \
--type=script \
--schedule="0 2 * * 0" \
--command="node scripts/backup.js --org production"
hybridRuns a script that may invoke Claude Code internally
/schedule-add --name="Audit with Analysis" \
--type=hybrid \
--schedule="0 2 * * 1" \
--command="bash scripts/audit-and-analyze.sh"
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sunday = 0)
│ │ │ │ │
* * * * *
| Expression | Meaning |
|---|---|
0 6 * * * | Daily at 6:00 AM |
0 8 * * 0 | Weekly Sunday at 8:00 AM |
0 * * * * | Every hour |
*/15 * * * * | Every 15 minutes |
0 2 * * 1 | Weekly Monday at 2:00 AM |
0 9 1 * * | Monthly on the 1st at 9:00 AM |
By default, only failures trigger Slack notifications. Customize with --notify-on:
failure - Notify when task fails (default)completion - Notify when task completes successfullyfailure,completion - Notify on both/schedule-add \
--name="Morning API Limits Check" \
--type=claude-prompt \
--schedule="0 6 * * *" \
--prompt="Query Salesforce API limits for production org and alert if any are above 80%"
/schedule-add \
--name="Weekly RevOps Report" \
--type=script \
--schedule="0 8 * * 1" \
--command="node scripts/generate-revops-report.js --format pdf" \
--notify-on="completion,failure"
/schedule-add \
--name="Monthly Security Audit" \
--type=claude-prompt \
--schedule="0 3 1 * *" \
--prompt="Run a comprehensive security audit on the production Salesforce org" \
--timeout=1800
scheduler-config.jsonscheduler/logs//schedule-list - View all scheduled tasks/schedule-run - Run a task immediately/schedule-logs - View task execution logs/schedule-remove - Remove a scheduled task