Schedules

Schedules let you run HTTP requests on a recurring basis using cron expressions. Each schedule is a first-class resource that you can create, pause, resume, and delete independently.

Creating a schedule

curl -X POST "https://v2-api.zeplo.io/workspaces/WS_ID/schedules/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "sync-inventory",
    "queueId": "QUEUE_ID",
    "schedule": "0 */6 * * *",
    "requestTemplate": {
      "method": "POST",
      "url": "https://your-api.com/sync",
      "headers": {"Content-Type": "application/json"},
      "body": "{\"full_sync\": true}"
    }
  }'

This creates a schedule that runs every 6 hours.

Cron syntax

Schedules use standard cron syntax with 5 fields:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │
* * * * *

Examples:

Expression Description
* * * * * Every minute
0 * * * * Every hour
0 9 * * 1-5 9 AM on weekdays
0 0 1 * * Midnight on the 1st of each month
*/15 * * * * Every 15 minutes

Schedule status

Schedules can be active or paused.

# Pause a schedule
curl -X PATCH "https://v2-api.zeplo.io/workspaces/WS_ID/schedules/SCHEDULE_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "paused"}'

# Resume
curl -X PATCH "https://v2-api.zeplo.io/workspaces/WS_ID/schedules/SCHEDULE_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "active"}'

Execution tracking

Each time a schedule fires, a new request is created in the associated queue. You can see:

  • Next run — When the schedule will fire next
  • Last run — When it last fired
  • Request history — All requests created by this schedule, with their statuses

Retry behavior

Each scheduled execution inherits the request template’s retry settings. If a scheduled request fails all its retries, the schedule continues — the next cron tick creates a fresh request.

Deleting a schedule

curl -X DELETE "https://v2-api.zeplo.io/workspaces/WS_ID/schedules/SCHEDULE_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Deleting a schedule stops future executions. Requests already created by the schedule are not affected.