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

# Create jobs schedule

> Create a new schedule for a tenant



## OpenAPI

````yaml put /{env_id}/{flow_id}/{tenant}/jobs/schedule
openapi: 3.1.0
info:
  title: hotglue API
  version: '1.2'
servers:
  - url: https://api.hotglue.com
security:
  - sec0: []
paths:
  /{env_id}/{flow_id}/{tenant}/jobs/schedule:
    put:
      summary: Create jobs schedule
      description: Create a new schedule for a tenant
      operationId: jobs-schedule
      parameters:
        - name: env_id
          in: path
          description: ID of environment
          schema:
            type: string
          required: true
        - name: flow_id
          in: path
          description: ID of flow
          schema:
            type: string
          required: true
        - name: tenant
          in: path
          description: ID of tenant
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - schedule_expression
              properties:
                schedule_expression:
                  type: string
                  description: >-
                    cron expression defining how often sync should occur e.g.
                    `cron(0 0 * * *)`
                job_type:
                  type: string
                  description: >-
                    For v2 flows, defines the type of job. Accepts "read" or
                    "write."
                  enum:
                    - read
                    - write
                state:
                  type: string
                  description: Whether this schedule should be DISABLED or ENABLED
                  default: ENABLED
                  enum:
                    - DISABLED
                    - ENABLED
                connector_id:
                  type: string
                  description: Optional specific connector or tap ID to set the schedule on
                override_start_date:
                  type: string
                  format: date-time
                  description: >-
                    Optional override for the `start_date` that jobs will run
                    with. This will ignore state bookmarks and any `start_date`
                    in the config.
                override_selected_tables:
                  type: object
                  description: Override the unified schema selection for this schedule
                override_field_map:
                  type: object
                  description: Override the field map selection for this schedule
                environment_variables:
                  type: object
                  description: >-
                    Set optional environment variables for the job to use
                    (generally for use in the ETL).
                schedule_jitter_minutes:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 720
                  description: >-
                    Jitter window in minutes for default schedules. Only allowed
                    when tenant is `default`; set to null to clear.
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    Code: BadRequestError
                    Message: Invalid cron expression!
              schema:
                type: object
                properties:
                  Code:
                    type: string
                    example: BadRequestError
                  Message:
                    type: string
                    example: Invalid cron expression!
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key

````