2.9 KiB
2.9 KiB
name, description
| name | description |
|---|---|
| config-schedule | Use when user asks to schedule workflows, manage cron jobs for automated workflow execution, enable/disable schedule triggers, or view workflow execution schedules. |
Config Schedule - Workflow Schedule Management
Overview
Manage scheduled workflow executions using cron expressions. Schedule workflows to run automatically at specified times.
When to Use
- User wants to schedule a workflow to run automatically
- User needs to set up cron-based workflow triggers
- User wants to enable/disable existing schedules
- User needs to view or update workflow schedules
- User wants to see which workflows have schedules configured
API Endpoints
Base path: $VIBESURF_ENDPOINT/api/schedule
Schedule Management
| Action | Method | Endpoint | Description |
|---|---|---|---|
| List Schedules | GET | /api/schedule |
Get all workflow schedules |
| Get Schedule | GET | /api/schedule/{flow_id} |
Get schedule for specific workflow |
| Create Schedule | POST | /api/schedule |
Create new schedule for a workflow |
| Update Schedule | PUT | /api/schedule/{flow_id} |
Update existing schedule |
Request Examples
Create Schedule
POST /api/schedule
{
"flow_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"cron_expression": "0 9 * * 1-5",
"is_enabled": true,
"description": "Run every weekday at 9 AM"
}
Update Schedule
PUT /api/schedule/{flow_id}
{
"cron_expression": "0 12 * * *",
"is_enabled": true,
"description": "Run daily at noon"
}
Enable/Disable Schedule
PUT /api/schedule/{flow_id}
{
"is_enabled": false
}
Schedule Fields
| Field | Type | Required | Description |
|---|---|---|---|
| flow_id | string | Yes | Workflow/Flow ID to schedule |
| cron_expression | string | No | Cron expression (e.g., '0 9 * * 1-5') |
| is_enabled | bool | No | Whether the schedule is active |
| description | string | No | Description of the schedule |
Cron Expression Format
Standard cron format: minute hour day_of_month month day_of_week
| Expression | Description |
|---|---|
0 9 * * 1-5 |
Every weekday at 9:00 AM |
0 12 * * * |
Every day at 12:00 PM |
0 */6 * * * |
Every 6 hours |
0 0 * * 0 |
Every Sunday at midnight |
0 8,20 * * * |
At 8:00 AM and 8:00 PM daily |
Workflow
- Get workflow ID → From existing workflows or import
- Create schedule →
POST /api/schedulewith cron expression - Verify schedule →
GET /api/schedule/{flow_id}to confirm - Update as needed →
PUT /api/schedule/{flow_id}to modify
Notes
- Each workflow can only have one schedule
- Schedules are automatically reloaded after creation/update
- The schedule manager must be running for schedules to execute
next_execution_atis automatically calculated from the cron expression