Skip to main content
Create a new schedule in the scheduler blob revision. The schedule is registered with the underlying scheduling service immediately and begins firing according to its configuration once it becomes active.

POST /revisions/:id/data/command (Command: create_schedule)

Request Body

ParameterTypeRequiredDescription
enginestringYesMust be scheduler_blobhub.
commandstringYesMust be create_schedule.
repeatstringYesEither one_time or recurring_cron.
timezonestringYesIANA timezone name (e.g. America/New_York, UTC).
invocation_target_typestringYesMust be workflow.
invocation_targetobjectYesTarget to invoke when the schedule fires. See Overview for field details.
cron_expressionstringConditionalRequired when repeat is recurring_cron. Six-field AWS cron expression.
invocation_timestringConditionalRequired when repeat is one_time. ISO 8601 datetime without timezone suffix (e.g. 2026-05-01T14:30:00), interpreted in the schedule’s timezone.
enabledbooleanNoWhether the schedule is initially enabled. Defaults to true.
start_datestringNoISO 8601 UTC datetime before which the schedule does not fire.
end_datestringNoISO 8601 UTC datetime after which the schedule does not fire.

Response

ParameterTypeDescription
scheduleobjectThe created schedule object.

Example (Recurring Cron)

{
  "engine": "scheduler_blobhub",
  "command": "create_schedule",
  "repeat": "recurring_cron",
  "cron_expression": "0 9 * * ? *",
  "timezone": "America/New_York",
  "enabled": true,
  "invocation_target_type": "workflow",
  "invocation_target": {
    "revision_id": "rev-789",
    "session_id": "sess-abc",
    "workflow_alias": "daily-report",
    "input_data": []
  }
}
{
  "schedule": {
    "id": "sched-001",
    "revision_id": "rev-scheduler-001",
    "created_at": "2026-04-07T12:00:00Z",
    "modified_at": "2026-04-07T12:00:00Z",
    "auth_target": "user",
    "auth_target_id": "user-001",
    "enabled": true,
    "repeat": "recurring_cron",
    "cron_expression": "0 9 * * ? *",
    "invocation_time": null,
    "timezone": "America/New_York",
    "start_date": null,
    "end_date": null,
    "state": "active",
    "invocation_target_type": "workflow",
    "invocation_target": {
      "org_id": "org-123",
      "blob_id": "blob-456",
      "revision_id": "rev-789",
      "session_id": "sess-abc",
      "workflow_alias": "daily-report",
      "input_data": []
    }
  }
}

Example (One-Time)

{
  "engine": "scheduler_blobhub",
  "command": "create_schedule",
  "repeat": "one_time",
  "invocation_time": "2026-05-01T14:30:00",
  "timezone": "UTC",
  "invocation_target_type": "workflow",
  "invocation_target": {
    "revision_id": "rev-789",
    "session_id": "sess-abc",
    "workflow_alias": "one-shot-job",
    "input_data": ["payload"]
  }
}
{
  "schedule": {
    "id": "sched-002",
    "revision_id": "rev-scheduler-001",
    "created_at": "2026-04-07T12:05:00Z",
    "modified_at": "2026-04-07T12:05:00Z",
    "auth_target": "user",
    "auth_target_id": "user-001",
    "enabled": true,
    "repeat": "one_time",
    "cron_expression": null,
    "invocation_time": "2026-05-01T14:30:00",
    "timezone": "UTC",
    "start_date": null,
    "end_date": null,
    "state": "active",
    "invocation_target_type": "workflow",
    "invocation_target": {
      "org_id": "org-123",
      "blob_id": "blob-456",
      "revision_id": "rev-789",
      "session_id": "sess-abc",
      "workflow_alias": "one-shot-job",
      "input_data": ["payload"]
    }
  }
}