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

# Update the schedule by the given schedule id and schedule request

> An endpoint for updating the schedule for the given schedule id and schedule request



## OpenAPI

````yaml /openapi/public-api-endpoint-reference.yaml patch /v1/projects/{projectId}/schedules/{scheduleId}
openapi: 3.1.0
info:
  title: Maia Public REST API
  version: '1.0'
servers:
  - description: EU1
    url: https://eu1.api.matillion.com/dpc
  - description: US1
    url: https://us1.api.matillion.com/dpc
security:
  - bearerAuth: []
tags:
  - description: Manage Schedules
    name: Schedules
  - description: Manage Connections
    name: Connections
  - description: Operations for managing Project Variables
    name: Project Variables
  - description: Manage Pipelines
    name: Pipelines
  - description: Review pipelines against quality rules
    name: Pipeline Quality Review
  - description: Execute tests within a project
    name: Test Execution
  - description: Manage your AI agent tasks
    name: AI Agent Tasks
  - description: SCIM endpoints for user/group permission management
    name: Directory Integration
  - description: Publish shared pipeline artifacts
    name: Shared Pipeline Artifacts
  - description: Manage Repositories
    name: Repositories
  - description: Report on Credit Consumption
    name: Consumption
  - description: Manage Artifacts
    name: Artifacts
  - description: Operations for data lineage and governance
    name: Data Lineage
  - description: Manage Streaming Pipelines
    name: Streaming Pipelines
  - description: Execute a pipeline
    name: Pipeline Execution
  - description: ''
    name: Environments
  - description: ''
    name: Projects
  - description: Manage Agents
    name: Agents
  - description: Operations for managing Environment-level Overrides of Project Variables
    name: Project Variable Environment Overrides
  - description: Query audit events
    name: Audit Events
  - description: Connector Profiles
    name: Connectors
paths:
  /v1/projects/{projectId}/schedules/{scheduleId}:
    patch:
      tags:
        - Schedules
      summary: Update the schedule by the given schedule id and schedule request
      description: >-
        An endpoint for updating the schedule for the given schedule id and
        schedule request
      operationId: updateSchedule
      parameters:
        - in: path
          name: projectId
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: scheduleId
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            examples:
              Update Schedule Request:
                description: Update Schedule Request
                value:
                  cronExpression: 0 * * ? * * *
                  cronTimezone: Europe/Dublin
                  effectiveFrom: '2022-05-19T12:37:44.000Z'
                  name: Nightly database backup
                  scheduleEnabled: false
            schema:
              $ref: '#/components/schemas/ScheduleRequestDetails'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleSummary'
          description: Schedule updated successfully
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Wrong request parameters used
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not found
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unexpected error occurred
        '504':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Gateway timeout
components:
  schemas:
    ScheduleRequestDetails:
      type: object
      description: Schedule request body for creating a new scheduled request
      properties:
        allowConcurrentExecutions:
          type: boolean
          description: >-
            An optional boolean flag for whether the scheduled pipeline should
            be allowed to execute concurrently. If set to false the pipeline
            will not be executed if it is already running. This defaults to true
            if not specified.
          example: false
        cronExpression:
          type: string
          description: >-
            This is a cronExpression must be provided for a schedule. This
            should be cronExpression in the Quartz format.
          example: 0 * * ? * * *
        cronTimezone:
          type: string
          description: >
            An optional timezone region value to use with the schedule
            expression.


            If a timezone region is provided, it will be used to in combination
            with the cronExpression to

            determine the schedule run times in the specified timezone region.


            If no value is specified then this be set to UTC Zulu time to
            indicate +00:00 from the UTC Offset.
          example: Europe/Dublin
        effectiveFrom:
          type: string
          format: date-time
          description: >
            An optional date time value for when the schedule should start to
            run. If no value is specified then the

            effective from time will be set to when the schedule is created.


            If a effective from time is specified, this should be specified in
            the offset date time format as per ISO 8601.

            It should include an offset from UTC, specifying how far ahead or
            behind UTC the specified time is.


            The format of the date time will be one of the following:

            - "yyyy-MM-dd'T'HH:mm:ss+hh:mm" to represent a time ahead of UTC by
            +hh:mm

            - "yyyy-MM-dd'T'HH:mm:ss-hh:mm" to represent a time behind of UTC by
            -hh:mm

            - "yyyy-MM-dd'T'HH:mm:ssZ" to represent a time in UTC


            For example 2022-01-01T12:00:00+02:00 represents two hours ahead of
            UTC time 2022-01-01T10:00:00Z
          example: '2022-05-19T11:37:44.024Z'
        name:
          type: string
          description: The user provided name for the schedule
          example: Nightly database backup
        scheduleEnabled:
          type: boolean
          description: >-
            An optional enabled boolean flag for whether the schedule should be
            enabled. This defaults to true if not specified.
          example: false
      required:
        - cronExpression
        - name
    ScheduleSummary:
      type: object
      properties:
        cronExpression:
          type: string
          description: >-
            Either an intervalExpression or cronExpression must be present for a
            schedule. This this is formatted in the Quartz format.
          example: 0 * * ? * * *
        cronTimezone:
          type: string
          description: >
            The timezone region value used to determine in what timezone the
            CronExpression is applied.


            It will be used to in combination with the cronExpression to
            determine the schedule run times

            in the specified timezone region.
          example: Europe/Dublin
        effectiveFrom:
          type: string
          format: date-time
          description: |2
                A date time value specifying at what point the schedule becomes effective, before this time
                the schedule will not run.

                The format of the date time will be yyyy-MM-dd'T'HH:mm:ssZ and is always returned in UTC
          example: '2022-05-19T12:37:44.000Z'
        environmentName:
          type: string
          description: >-
            The environment name to run the pipeline that the schedule is
            associated with
          example: Dev Environment
        gridVariables:
          type: object
          additionalProperties:
            type: array
            items:
              type: array
              items:
                type: string
          description: >-
            The map of grid variables to be overridden when ETL pipeline is
            executed
          example:
            grid1:
              - - col1
                - col2
                - col3
              - - col1a
                - col2a
                - col3a
        intervalExpression:
          $ref: '#/components/schemas/IntervalExpression'
          description: >-
            Either an intervalExpression or cronExpression must be present for a
            schedule. This intervalExpression details the interval between each
            scheduled run.
        lastRunAt:
          type: string
          format: date-time
          description: >
            A datetime value for when the schedule last ran.


            The format of the date time will be yyyy-MM-dd'T'HH:mm:ssZ and is
            always returned in UTC
          example: '2022-06-30T01:14:00.000Z'
        name:
          type: string
          description: >-
            An optional name for the schedule, if not provided then it will
            constructed from pipelinename_environment_currentTimestamp
          example: Nightly database backup
        nextRunAt:
          type: string
          format: date-time
          description: |2
              A datetime value for when the schedule should next run.

              The format of the date time will be yyyy-MM-dd'T'HH:mm:ssZ and is always returned in UTC
          example: '2022-06-30T01:15:00.000Z'
        pipelineName:
          type: string
          description: Name of the pipeline that the schedule is associated with
          example: Nightly database backup
        scalarVariables:
          type: object
          additionalProperties:
            type: string
          description: >-
            The map of scalar variables to be overridden when ETL pipeline is
            executed
          example:
            variable1: value1
            variable2: value2
        scheduleEnabled:
          type: boolean
          description: An enabled boolean flag for whether the schedule is enabled.
          example: false
        scheduleId:
          type: string
          description: >-
            The generated unique schedule Id used to identify a specific
            schedule
          example: a2239897-51f8-4c09-83ab-0b2c28bd5a37
        versionName:
          type: string
          description: >-
            Optional artifact version name of the pipeline that the schedule is
            associated with
          example: 1.2.0
    ProblemDetail:
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
        status:
          type: integer
          format: int32
        title:
          type: string
        type:
          type: string
          format: uri
        violations:
          type: array
          items:
            type: string
    IntervalExpression:
      type: object
      properties:
        interval:
          type: integer
          format: int32
        unit:
          type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: a valid bearer token
      scheme: bearer
      type: http

````