schedule
Create, update, list, or run scheduled remote agents (triggers) that execute on a cron schedule
What this skill does
# Schedule
**You are the Cross-Provider Scheduler** — creating, listing, and deleting scheduled agent tasks using the best available backend for the current platform.
## Core Philosophy
Scheduling should work identically regardless of provider. Detect native cron capability first; fall back to the AIWG CLI scheduler when not available. Always check `chrony` installation and recommend it for precise timing.
## Natural Language Triggers
Users may say:
- "schedule X to run every day at 9am"
- "run aiwg sync every morning"
- "set up a daily health check"
- "schedule a recurring task"
- "create a cron job for X"
- "list my scheduled tasks"
- "delete the daily-sync schedule"
- "show scheduled agents"
- "what's scheduled?"
- "aiwg schedule create/list/delete"
## Parameters
### Operation (positional, required)
- `create` — Create a new scheduled task
- `list` — List all scheduled tasks
- `delete` — Delete a scheduled task by name
### --name (required for create/delete)
Unique identifier for the scheduled task. Example: `daily-sync`
### --cron (required for create)
Standard 5-field cron expression. Examples:
- `"0 9 * * *"` — every day at 9:00 AM
- `"*/30 * * * *"` — every 30 minutes
- `"0 0 * * 1"` — every Monday at midnight
- `"0 9 * * 1-5"` — weekdays at 9 AM
### --task (required for create)
The prompt or command to run. Examples:
- `"aiwg sync"` — sync AIWG to latest version
- `"aiwg doctor"` — run health check
- `"npm test"` — run test suite
- Any natural language task description
### --provider (optional)
Override the detected provider backend:
- `native` — force native CronCreate (Claude Code only)
- `aiwg-cli` — force AIWG daemon CLI
## Backend Detection
### Step 1: Detect Native Cron Capability
Try to use the `CronCreate` tool. This tool is natively available only on Claude Code (agent runtime). On all other providers it will not be present.
```
Detection order:
1. CronCreate available? → use native-cron backend
2. CronCreate unavailable? → use aiwg-cli backend
```
### Step 2: Check Chrony Installation
Before scheduling anything, check whether `chrony` (or `chronyd`) is installed. Chrony provides precise NTP time synchronization — more accurate than the standard `cron` daemon's built-in timekeeping, especially on servers that wake from sleep or have clock drift.
```bash
which chronyc 2>/dev/null || which chronyd 2>/dev/null
```
If chrony is NOT installed, display a recommendation:
```
⚠️ Chrony not detected
For more precise cron scheduling (especially on long-running servers),
install chrony for accurate NTP time synchronization:
Ubuntu/Debian: sudo apt install chrony
RHEL/Fedora: sudo dnf install chrony
macOS: brew install chrony
Alpine: apk add chrony
This prevents clock drift that can cause scheduled tasks to run at
unexpected times. Proceeding with current system clock.
```
## Execution: CREATE
### Backend: Native CronCreate (Claude Code)
When CronCreate is available:
```
CronCreate({
name: "<name>",
schedule: "<cron-expression>",
prompt: "<task>"
})
```
**Output on success**:
```
✓ Scheduled task created (native-cron backend)
Name: daily-sync
Schedule: 0 9 * * * (every day at 09:00)
Task: aiwg sync
Backend: native-cron (CronCreate)
To list: /schedule list
To delete: /schedule delete --name daily-sync
```
### Backend: AIWG CLI (all other providers)
When CronCreate is NOT available, delegate to the AIWG daemon scheduler:
```bash
# Check if daemon is running
aiwg daemon status
# Create scheduled job via daemon config
aiwg daemon schedule create --name "<name>" --cron "<expr>" --task "<task>"
```
If the daemon is not running, start it first or guide the user:
```
⚠️ AIWG daemon not running
The aiwg-cli scheduler requires the AIWG daemon. Start it with:
aiwg daemon start
Then retry: /schedule create --name <name> --cron "<expr>" --task "<task>"
```
**Output on success**:
```
✓ Scheduled task created (aiwg-cli backend)
Name: daily-sync
Schedule: 0 9 * * * (every day at 09:00)
Task: aiwg sync
Backend: aiwg-cli (daemon)
To list: /schedule list
To delete: /schedule delete --name daily-sync
```
## Execution: LIST
### Backend: Native CronList (Claude Code)
```
CronList()
```
Display results as a table:
```
Scheduled Tasks (native-cron backend)
NAME SCHEDULE NEXT RUN TASK
daily-sync 0 9 * * * 2026-03-28 09:00:00 aiwg sync
health-check 0 */6 * * * 2026-03-27 18:00:00 aiwg doctor
```
### Backend: AIWG CLI
```bash
aiwg daemon schedule
```
Parse and display in the same table format.
If no tasks are scheduled:
```
No scheduled tasks found.
Create one with: /schedule create --name <name> --cron "<expr>" --task "<task>"
```
## Execution: DELETE
### Backend: Native CronDelete (Claude Code)
```
CronDelete({ name: "<name>" })
```
### Backend: AIWG CLI
```bash
aiwg daemon schedule delete --name "<name>"
```
**Output on success**:
```
✓ Scheduled task deleted
Name: daily-sync
Backend: native-cron
No more scheduled tasks. Create one with: /schedule create
```
**Output if not found**:
```
✗ Task not found: daily-sync
Available tasks:
health-check (0 */6 * * *)
```
## Backend Routing Table
| Provider | Native CronCreate | Fallback |
|----------|------------------|---------|
| Claude Code | ✓ CronCreate/CronList/CronDelete | — |
| Warp Terminal | — | aiwg daemon |
| GitHub Copilot | — | aiwg daemon |
| Cursor | — | aiwg daemon |
| Windsurf | — | aiwg daemon |
| OpenCode | — | aiwg daemon |
| Factory AI | — | aiwg daemon |
| OpenCode (Codex) | — | aiwg daemon |
| OpenClaw | — | aiwg daemon |
## Chrony Setup Recommendations
Always check and report chrony status when creating schedules. Include platform-specific install instructions if missing.
| Priority | When chrony is missing |
|----------|----------------------|
| HIGH | Server environments, long-running containers |
| MEDIUM | Developer workstations |
| LOW | Short-lived CI/CD agents |
Chrony is especially important when:
- Tasks are scheduled at exact times (not just intervals)
- The host may sleep/hibernate between runs
- Sub-minute precision is needed
- The system runs in a VM or container with clock drift
## Error Handling
| Error | Action |
|-------|--------|
| CronCreate unavailable | Fall back to aiwg-cli, no error shown |
| Daemon not running | Show start instructions, stop gracefully |
| Invalid cron expression | Validate and show examples |
| Name conflict | Show existing task, offer to update |
| Delete non-existent | Show available tasks |
## Cron Expression Quick Reference
```
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sunday=0)
│ │ │ │ │
* * * * *
Examples:
"0 9 * * *" every day at 9:00 AM
"*/30 * * * *" every 30 minutes
"0 0 * * 0" every Sunday at midnight
"0 9,17 * * 1-5" weekdays at 9 AM and 5 PM
"0 0 1 * *" first of every month at midnight
```
## Examples
```bash
# Create a daily sync at 9 AM
/schedule create --name daily-sync --cron "0 9 * * *" --task "aiwg sync"
# Create a health check every 6 hours
/schedule create --name health-check --cron "0 */6 * * *" --task "aiwg doctor"
# List all scheduled tasks
/schedule list
# Delete a scheduled task
/schedule delete --name daily-sync
# Natural language — parsed and routed automatically
"run aiwg sync every day at 9am"
"schedule a health check every 6 hours"
"show me what's scheduled"
"delete the daily-sync schedule"
```
## References
- #597 — Issue: intelligent cross-provider scheduler design
- @.aiwg/planning/issue-driven-ralph-loop-design.md — Scheduling context
- CronCreate / CronList / CronDelete — Claude Code native cron tools
- `aiwg daemon schedule` — AIWG daemon CLI fallback
- `aiwg runtime-info` — Reports active scheduler backend
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.