Skip to main content
POST
/
api
/
v1
/
schedules
curl -X POST \
  -H "Authorization: Bearer alf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "schedule_id": "my-daily-schedule",
    "workflow_type": "MyWorkflow",
    "task_queue": "my-task-queue",
    "cron": "0 4 * * *",
    "overlap_policy": "Skip"
  }' \
  /api/v1/schedules
{
  "message": "Schedule created"
}
Create a new schedule that automatically starts workflow executions on a cron-based cadence. You can configure the workflow type, task queue, input data, and overlap behavior.
schedule_id
string
required
Unique identifier for this schedule. Must not conflict with existing schedules.
workflow_type
string
required
The workflow type to execute on each schedule trigger.
task_queue
string
required
The task queue where scheduled workflows will be executed.
cron
string
required
Cron expression defining the schedule timing. Uses standard 5-field format: minute hour day month weekdayExamples:
  • 0 * * * * - Every hour at minute 0
  • 0 2 * * * - Daily at 2:00 AM
  • 0 3 * * 0 - Weekly on Sunday at 3:00 AM
  • */15 * * * * - Every 15 minutes
input
any
Input data passed to each scheduled workflow execution. Will be JSON-serialized.
overlap_policy
string
Policy for handling overlapping executions when a new run is scheduled while a previous run is still active.Values:
  • Skip - Skip the new run (default)
  • BufferOne - Buffer one run, start when current completes
  • BufferAll - Buffer all runs
  • CancelOther - Cancel the running execution and start the new one
  • TerminateOther - Terminate the running execution and start the new one
  • AllowAll - Allow concurrent executions
curl -X POST \
  -H "Authorization: Bearer alf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "schedule_id": "my-daily-schedule",
    "workflow_type": "MyWorkflow",
    "task_queue": "my-task-queue",
    "cron": "0 4 * * *",
    "overlap_policy": "Skip"
  }' \
  /api/v1/schedules
{
  "message": "Schedule created"
}