schedule-management
Manage agentapi-proxy schedules for delayed and recurring session execution. Use when you need to: (1) Create one-time or recurring schedules, (2) List existing schedules, (3) Update schedule configurations, (4) Delete schedules, (5) Manually trigger schedules, (6) Filter schedules by status, scope, or team. Supports cron expressions for recurring tasks and ISO 8601 timestamps for one-time delayed execution.
What this skill does
# Schedule Management
This skill provides guidance for managing agentapi-proxy schedules that automatically create sessions at specified times or intervals.
## Overview
Schedules enable automatic session creation at specific times or on recurring intervals. Each schedule has:
- **Name**: Descriptive name for the schedule
- **Execution Type**: One-time (scheduled_at) or recurring (cron_expr)
- **Session Config**: Environment variables, tags, and initial messages for created sessions
- **Status**: Active, paused, or completed
- **Scope**: User-level or team-level access
## Core Workflows
### Creating a Schedule
#### One-Time Delayed Execution
First, create a JSON file with your schedule configuration:
```bash
cat > schedule.json <<'EOF'
{
"name": "Code Review Session",
"scheduled_at": "2025-01-15T14:00:00Z",
"session_config": {
"tags": {
"repository": "org/repo",
"task": "code-review"
},
"params": {
"message": "Review all open PRs"
}
}
}
EOF
agentapi-proxy client schedule create -f schedule.json
```
#### Recurring Execution (Cron)
```bash
cat > schedule-cron.json <<'EOF'
{
"name": "Daily Standup Bot",
"cron_expr": "0 9 * * 1-5",
"timezone": "America/New_York",
"session_config": {
"tags": {
"repository": "org/standup-bot",
"type": "standup"
},
"params": {
"message": "Generate daily standup report"
},
"environment": {
"SLACK_WEBHOOK": "https://hooks.slack.com/..."
}
}
}
EOF
agentapi-proxy client schedule create -f schedule-cron.json
```
**Timezone Support:**
- `timezone`: IANA timezone name (e.g., "America/New_York", "Europe/London", "Asia/Tokyo")
- Default: "Asia/Tokyo"
- The cron expression is evaluated in the specified timezone
**Common Cron Expressions:**
- `0 9 * * 1-5` - Every weekday at 9:00 AM
- `0 */6 * * *` - Every 6 hours
- `0 0 * * 0` - Every Sunday at midnight
- `30 14 1 * *` - First day of every month at 2:30 PM
**Response:**
```json
{
"id": "schedule-abc123",
"name": "Daily Standup Bot",
"status": "active",
"cron_expr": "0 9 * * 1-5",
"created_at": "2024-01-01T12:00:00Z",
"next_run": "2024-01-02T09:00:00Z"
}
```
### Listing Schedules
```bash
# List all schedules
agentapi-proxy client schedule list
# Note: Filtering by status, scope, or team is done by the API automatically
# based on your authentication and permissions
```
### Getting a Specific Schedule
```bash
agentapi-proxy client schedule get SCHEDULE_ID
```
### Updating a Schedule
```bash
# Update specific fields using apply (patch)
echo '{"status":"paused"}' | agentapi-proxy client schedule apply SCHEDULE_ID
# Or update multiple fields
cat > update.json <<'EOF'
{
"name": "Updated Schedule Name",
"status": "paused",
"cron_expr": "0 10 * * 1-5"
}
EOF
cat update.json | agentapi-proxy client schedule apply SCHEDULE_ID
```
### Deleting a Schedule
```bash
agentapi-proxy client schedule delete SCHEDULE_ID
```
### Manually Triggering a Schedule
**Note:** The `trigger` command is not yet implemented in the CLI client. Use the API directly if you need to manually trigger a schedule:
```bash
curl -X POST https://api.example.com/schedules/SCHEDULE_ID/trigger \
-H "X-API-Key: YOUR_API_KEY"
```
**Response:**
```json
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"triggered_at": "2024-01-02T15:30:00Z"
}
```
## Use Cases
### 1. Daily Reports
```json
{
"name": "Daily Team Report",
"cron_expr": "0 17 * * 1-5",
"session_config": {
"tags": {
"type": "report",
"team": "engineering"
},
"params": {
"message": "Generate end-of-day team report"
}
}
}
```
### 2. Weekly Code Reviews
```json
{
"name": "Weekly PR Review",
"cron_expr": "0 10 * * 1",
"session_config": {
"tags": {
"repository": "org/main-repo",
"type": "code-review"
},
"params": {
"message": "Review all open PRs from last week"
}
}
}
```
### 3. Incident Response Drills
```json
{
"name": "Monthly Incident Drill",
"cron_expr": "0 14 1 * *",
"session_config": {
"tags": {
"type": "incident-drill",
"team": "sre"
},
"params": {
"message": "Run incident response drill"
}
}
}
```
### 4. Delayed Task Execution
```json
{
"name": "Deploy After Hours",
"scheduled_at": "2025-01-15T22:00:00Z",
"session_config": {
"tags": {
"repository": "org/production",
"type": "deployment"
},
"params": {
"message": "Deploy version 2.0 to production"
}
}
}
```
## Schedule Status
- **active**: Schedule is enabled and will execute at the specified time
- **paused**: Schedule is temporarily disabled
- **completed**: One-time schedule that has already executed
## Access Control
- **User Scope**: Only the creating user can access and manage the schedule
- **Team Scope**: All team members can access and manage the schedule
- **Admin**: Can view and manage all schedules
## Template Variables
For schedule sessions, the `memory_key` map values support Go template rendering with schedule context variables:
- `{{.schedule_id}}`: Unique identifier of the schedule
- `{{.schedule_name}}`: Human-readable name of the schedule
- `{{.timezone}}`: Schedule timezone (IANA format, e.g., `Asia/Tokyo`)
**Example:**
```json
{
"memory_key": {
"schedule_ref": "{{.schedule_id}}",
"schedule_name": "{{.schedule_name}}"
}
}
```
> **Note:** The `params.message` field uses static text for schedules, not template rendering. Use the `memory_key` for dynamic references.
For the complete template variables reference including all available functions, see [TEMPLATE_VARIABLES.md](../references/TEMPLATE_VARIABLES.md#schedule-template-variables).
## Reference Documentation
For complete API endpoint documentation and permissions, see:
- [API_REFERENCE.md](../references/API_REFERENCE.md#schedule-management-endpoints) - Complete schedule API reference
- [PERMISSIONS.md](../references/PERMISSIONS.md) - Role-based access control details
- [TEMPLATE_VARIABLES.md](../references/TEMPLATE_VARIABLES.md) - Go template variables reference
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.