> ## Documentation Index
> Fetch the complete documentation index at: https://flows-docs.edges.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule a Flow

> Schedule flows to run automatically at specific times or on recurring schedules

Schedule flows to run automatically using cron expressions for recurring schedules or one-time execution at a specific date and time. Perfect for automated data collection, regular enrichment tasks, and workflow automation.

## Scheduling Options

You can schedule flows in two ways:

1. **Recurring Schedule (Cron)**: Use a cron expression to run flows at regular intervals
2. **One-Time Schedule**: Schedule a flow to run once at a specific date and time

## Required Parameters

<Note>
  Scheduled flows **require** a callback URL. The callback will be triggered when the scheduled flow executes.
</Note>

<Accordion title="Custom Data">
  Each item in the `inputs` array can include an optional **`custom_data`** object. The only valid key inside `custom_data` is **`meta`**. Use `meta` to attach a free-form object (e.g. your own IDs, tags, or context) that will be passed through and available in the flow output.

  **Example:**

  ```json theme={null}
  "inputs": [
    {
      ...
      "custom_data": {
        "meta": {
          "foo": "bar",
          "crm_id": 1234
        }
      }
    }
  ]
  ```

  <Info>
    We currently require **`meta`** as a workaround to ship this capability; a more solid implementation will follow soon without breaking changes.
  </Info>
</Accordion>

## Examples

<AccordionGroup>
  <Accordion title="Daily recurring schedule">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/linkedin-people-enrich/run/schedule \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "cron": "0 9 * * *",
      "timezone": "America/New_York",
      "inputs": [
        {
          "linkedin_profile_url": "https://www.linkedin.com/in/example"
        }
      ],
      "identity_mode": "managed",
      "callback": {
        "url": "https://your-app.com/webhook/scheduled-flow",
        "headers": {
          "Authorization": "Bearer your-webhook-token"
        }
      }
    }'
    ```

    This runs the flow every day at 9:00 AM Eastern Time.
  </Accordion>

  <Accordion title="Weekly schedule on specific days">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/salesnavigator-search-people/run/schedule \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "cron": "0 10 * * 1,3,5",
      "timezone": "Europe/Paris",
      "inputs": [
        {
          "sales_navigator_profile_search_url": "https://www.linkedin.com/sales/search/people?keywords=CTO"
        }
      ],
      "identity_mode": "managed",
      "callback": {
        "url": "https://your-app.com/webhook/scheduled-flow"
      }
    }'
    ```

    This runs every Monday, Wednesday, and Friday at 10:00 AM Paris time.
  </Accordion>

  <Accordion title="One-time scheduled execution">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/linkedin-domain-employees-enrich/run/schedule \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "schedule_at": "2026-01-20T14:00:00Z",
      "inputs": [
        {
          "domain": "example.com"
        }
      ],
      "identity_mode": "managed",
      "callback": {
        "url": "https://your-app.com/webhook/scheduled-flow",
        "headers": {
          "Authorization": "Bearer your-webhook-token"
        }
      }
    }'
    ```

    This runs the flow once at the specified date and time.
  </Accordion>

  <Accordion title="Hourly schedule with parameters">
    ```bash theme={null}
    curl --request POST \
      --url https://api.edges.run/v1/flows/linkedin-content-search-enrich/run/schedule \
      --header 'Content-Type: application/json' \
      --header 'X-API-Key: <your-api-key>' \
      --data '{
      "cron": "0 * * * *",
      "timezone": "UTC",
      "parameters": {
        "linkedin-search-content": {
          "max_results": 100
        }
      },
      "inputs": [
        {
          "linkedin_content_search_url": "https://www.linkedin.com/search/results/content/?keywords=AI"
        }
      ],
      "identity_mode": "managed",
      "callback": {
        "url": "https://your-app.com/webhook/scheduled-flow",
        "on": "final"
      }
    }'
    ```

    This runs every hour on the hour, with callback only sent when complete.
  </Accordion>
</AccordionGroup>

## Cron Expression Format

Cron expressions use POSIX format with 5 fields:

```
* * * * *
│ │ │ │ │
│ │ │ │ └─ Day of week (0-6, Sunday = 0)
│ │ │ └─── Month (1-12)
│ │ └───── Day of month (1-31)
│ └─────── Hour (0-23)
└───────── Minute (0-59)
```

**Common Examples:**

* `0 9 * * *` - Every day at 9:00 AM
* `*/30 * * * *` - Every 30 minutes
* `0 */2 * * *` - Every 2 hours
* `0 9 * * 1-5` - Weekdays at 9:00 AM
* `0 0 1 * *` - First day of every month at midnight

## Timezone Support

Specify timezone using IANA timezone format (e.g., `"America/New_York"`, `"Europe/London"`, `"Asia/Tokyo"`). If not provided, UTC is used by default.

## Managing Schedules

Once created, you can:

* View all schedules with [List Schedules](/api/schedules/list)
* Get schedule details with [Get Schedule](/api/schedules/get)
* Pause, resume, or cancel with [Manage Schedule](/api/schedules/manage)

<Info>
  Scheduled flows will execute using the same inputs and parameters you provide. Make sure your callback endpoint can handle the flow results when they execute.
</Info>


## OpenAPI

````yaml POST /flows/{flow_slug}/run/schedule
openapi: 3.1.0
info:
  title: ED Automation Flows API
  description: This is the Flows API documentation for ED Automation
  version: dev
servers:
  - url: https://api.edges.run/v1
security:
  - XApiKeyAuth: []
paths:
  /flows/{flow_slug}/run/schedule:
    post:
      tags:
        - flows
      summary: Schedule a flow asynchronously
      parameters:
        - schema:
            type: string
          in: path
          name: flow_slug
          required: true
          description: Flow slug
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                steps:
                  type: array
                  description: Optional steps to perform in the flow
                  items:
                    type: string
                    description: Optional step slug
                  minItems: 0
                parameters:
                  type: object
                  additionalProperties: true
                  description: Parameters for the flow run
                inputs:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
                    properties:
                      custom_data:
                        type: object
                        additionalProperties: true
                        nullable: true
                        description: Custom data (ex-metadata)
                    default: {}
                  minItems: 1
                  maxItems: 1000
                identity_ids:
                  type: array
                  description: >-
                    An array of Identity UUIDs linked to identities (e.g.
                    LinkedIn) used to execute the Action. You must provide at
                    least one valid UID with access to the integration. Do not
                    use account_uid values — only user_uid is supported.
                  items:
                    type: string
                    format: uuid
                  nullable: true
                  example:
                    - 44444444-4444-4444-4444-444444444444
                identity_mode:
                  type: string
                  enum:
                    - direct
                    - auto
                    - managed
                  default: direct
                  nullable: true
                  description: >-
                    If "auto", the Action will use any identities from the
                    current workspace (unless you have provided a list of
                    identity_ids). "managed" will use the Edges pool of
                    identities for an extra credit cost
                callback:
                  type: object
                  properties:
                    url:
                      type: string
                      description: >-
                        URL to send the results to. The Action will send a POST
                        request with the results to this URL. The request will
                        include a JSON body with the results of the Action.
                      nullable: true
                      pattern: ^(https?:\/\/[^\s]+)$
                      example: https://example.com/callback
                    headers:
                      type: object
                      description: Headers to include in the callback request.
                      additionalProperties:
                        type: string
                    'on':
                      type: string
                      description: >-
                        Define when you want to receive callbacks. "all" will
                        send callbacks to stream outputs, "final" will send a
                        single callback when all inputs are processed or an
                        error occured on the run.
                      enum:
                        - all
                        - final
                      default: all
                  required:
                    - url
                timezone:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: >-
                    The timezone to use for the cron expression (IANA timezone
                    format, e.g., "America/New_York" or "Europe/Paris"). If not
                    provided, the UTC timezone will be used.
                cron:
                  type: string
                  minLength: 1
                  maxLength: 256
                  description: >-
                    Cron expression for scheduling the action. If provided, the
                    action will be scheduled to run at the specified intervals.
                schedule_at:
                  type: string
                  format: date-time
                  description: >-
                    This is for one shot or 1st programmation calls. If not
                    provided, the run will be scheduled immediately.
              anyOf:
                - properties:
                    cron:
                      type: string
                      minLength: 1
                      maxLength: 256
                      description: >-
                        Cron expression for scheduling the action. If provided,
                        the action will be scheduled to run at the specified
                        intervals.
                  required:
                    - cron
                - properties:
                    schedule_at:
                      type: string
                      format: date-time
                      description: >-
                        This is for one shot or 1st programmation calls. If not
                        provided, the run will be scheduled immediately.
                  required:
                    - schedule_at
              required:
                - inputs
                - callback
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  schedule_flow_run_uid:
                    type: string
                    description: The UID of the scheduled flow.
                  status:
                    type: string
                    enum:
                      - ACTIVE
                      - CANCELLED
                      - PAUSED
                      - COMPLETED
                    description: The status of the scheduled flow.
                  cron:
                    type: string
                    description: Cron expression for the scheduled flow (POSIX format)
                    nullable: true
                  timezone:
                    type: string
                    description: Timezone for the scheduled flow (IANA timezone format)
                    nullable: true
                  next_execution_at:
                    type: string
                    format: date-time
                    nullable: true
                    description: Next execution at
                  created_at:
                    type: string
                    format: date-time
                    description: The date and time when the run was created.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-0'
components:
  schemas:
    def-0:
      title: APIError
      description: >-
        Represents an error returned by the API. This schema defines the
        standard structure of error messages to ensure consistent error handling
        across the application.
      type: object
      properties:
        error_label:
          type: string
          nullable: true
        error_scope:
          type: string
          enum:
            - input
            - integ
            - param
            - config
          nullable: true
        error_ref:
          type: string
          nullable: true
          example: ERR-12345
        message:
          type: string
        status_code:
          type: integer
          nullable: true
        params:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  type: string
          nullable: true
        data:
          type: object
          nullable: true
          additionalProperties: true
          description: Additional data about the error
      additionalProperties: false
  securitySchemes:
    XApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````