Windmill · Arazzo Workflow

Windmill Schedule a Flow

Version 1.0.0

Resolve a flow, create a cron schedule for it, then read the schedule back.

1 workflow 1 source API 1 provider
View Spec View on GitHub AutomationInternal ToolsOpen SourceProCode API CompositionScriptsWebhooksWorkflow EngineWorkflowsArazzoWorkflows

Provider

windmill

Workflows

schedule-flow
Create a recurring cron schedule for an existing Windmill flow.
Confirms the flow exists, registers a cron schedule pointing at it with the supplied arguments, then reads the schedule back to verify it.
3 steps inputs: args, flowPath, schedule, schedulePath, timezone, token, workspace outputs: enabled, schedulePath
1
getFlow
getFlowByPath
Read the flow by path to confirm it exists before scheduling it.
2
createSchedule
createSchedule
Create a cron schedule targeting the flow. is_flow is true because the target is a flow, and the schedule is enabled immediately.
3
getSchedule
getSchedule
Read the schedule back to confirm it was registered with the expected cron expression and enabled state.

Source API Descriptions

Arazzo Workflow Specification

windmill-schedule-flow-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Windmill Schedule a Flow
  summary: Resolve a flow, create a cron schedule for it, then read the schedule back.
  description: >-
    Attaches a recurring cron schedule to an existing flow. The workflow reads
    the flow by path to confirm it exists, creates a schedule that targets the
    flow with is_flow set true and a 6-field cron expression, then reads the
    schedule back to confirm registration and enabled state. Every step spells
    out its request inline so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: windmillApi
  url: ../openapi/windmill-api-openapi.yml
  type: openapi
workflows:
- workflowId: schedule-flow
  summary: Create a recurring cron schedule for an existing Windmill flow.
  description: >-
    Confirms the flow exists, registers a cron schedule pointing at it with the
    supplied arguments, then reads the schedule back to verify it.
  inputs:
    type: object
    required:
    - token
    - workspace
    - flowPath
    - schedulePath
    - schedule
    - timezone
    - args
    properties:
      token:
        type: string
        description: Windmill API token presented as a Bearer credential.
      workspace:
        type: string
        description: The Windmill workspace id.
      flowPath:
        type: string
        description: Path to the flow the schedule should run.
      schedulePath:
        type: string
        description: The unique path for the schedule (e.g. "f/team/nightly_flow").
      schedule:
        type: string
        description: 6-field cron expression with seconds (e.g. "0 0 6 * * *").
      timezone:
        type: string
        description: IANA timezone for the schedule (e.g. "UTC").
      args:
        type: object
        description: The argument map passed to the scheduled flow on each run.
  steps:
  - stepId: getFlow
    description: >-
      Read the flow by path to confirm it exists before scheduling it.
    operationId: getFlowByPath
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.token"
    - name: workspace
      in: path
      value: $inputs.workspace
    - name: path
      in: path
      value: $inputs.flowPath
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      flowPath: $response.body#/path
  - stepId: createSchedule
    description: >-
      Create a cron schedule targeting the flow. is_flow is true because the
      target is a flow, and the schedule is enabled immediately.
    operationId: createSchedule
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.token"
    - name: workspace
      in: path
      value: $inputs.workspace
    requestBody:
      contentType: application/json
      payload:
        path: $inputs.schedulePath
        schedule: $inputs.schedule
        timezone: $inputs.timezone
        script_path: $inputs.flowPath
        is_flow: true
        args: $inputs.args
        enabled: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      createdPath: $response.body
  - stepId: getSchedule
    description: >-
      Read the schedule back to confirm it was registered with the expected
      cron expression and enabled state.
    operationId: getSchedule
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.token"
    - name: workspace
      in: path
      value: $inputs.workspace
    - name: path
      in: path
      value: $inputs.schedulePath
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      enabled: $response.body#/enabled
      isFlow: $response.body#/is_flow
  outputs:
    schedulePath: $inputs.schedulePath
    enabled: $steps.getSchedule.outputs.enabled