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

# Disable a schedule

> Disables a schedule and unschedules it from pg_cron. The schedule must belong to the authenticated user's organization. If the schedule is already disabled, this operation is idempotent.



## OpenAPI

````yaml /openapi/em-runtime-utils-v2.yaml patch /utils/schedules/{schedule_id}/disable
openapi: 3.1.0
info:
  title: em_runtime_utils
  version: 5.27.0
servers: []
security: []
paths:
  /utils/schedules/{schedule_id}/disable:
    patch:
      tags:
        - schedules
      summary: Disable a schedule
      description: >-
        Disables a schedule and unschedules it from pg_cron. The schedule must
        belong to the authenticated user's organization. If the schedule is
        already disabled, this operation is idempotent.
      operationId: disable_schedule
      parameters:
        - name: schedule_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the schedule to disable
            title: Schedule Id
          description: ID of the schedule to disable
        - name: X-Project-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    ScheduleResponse:
      properties:
        schedule_id:
          type: string
          title: Schedule Id
          description: ID of the schedule
        schedule_name:
          type: string
          title: Schedule Name
          description: Unique human readable name for the schedule
        schedule:
          anyOf:
            - $ref: '#/components/schemas/CronScheduleResponse'
            - $ref: '#/components/schemas/OneOffScheduleResponse'
          title: Schedule
          description: Schedule configuration (timezone-aware)
        reference_id:
          type: string
          title: Reference Id
          description: >-
            Reference ID (e.g. workflow config ID) held in Data Readiness
            resources
        config:
          $ref: '#/components/schemas/NotificationConfig'
          description: Schedule configuration (currently only NOTIFICATION is supported)
        enabled:
          type: boolean
          title: Enabled
          description: Whether the schedule is ready to be triggered
      type: object
      required:
        - schedule_id
        - schedule_name
        - schedule
        - reference_id
        - config
        - enabled
      title: ScheduleResponse
      description: >-
        Response body for a schedule.


        Schedule values are returned in their original timezone for
        user-friendly display.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    CronScheduleResponse:
      properties:
        type:
          type: string
          const: cron
          title: Type
          description: Schedule type
        cron:
          type: string
          title: Cron
          description: >-
            Cron expression dynamically converted from UTC to the original
            timezone (e.g., '0 9 * * 1')
        timezone:
          type: string
          title: Timezone
          description: IANA timezone name (e.g., 'America/New_York', 'Europe/London')
      type: object
      required:
        - type
        - cron
        - timezone
      title: CronScheduleResponse
      description: >-
        Cron-based schedule response with timezone-aware values.


        The cron expression is dynamically converted from UTC back to the
        original timezone

        specified by the user for display purposes.
    OneOffScheduleResponse:
      properties:
        type:
          type: string
          const: one_off
          title: Type
          description: Schedule type
        at:
          type: string
          format: date-time
          title: At
          description: >-
            ISO 8601 datetime when the schedule should trigger (timezone-naive,
            converted from UTC to the original timezone, e.g.,
            '2026-02-10T14:30:00'). This value has been converted from the
            UTC-stored datetime back to the original timezone specified in the
            'timezone' field.
        timezone:
          type: string
          title: Timezone
          description: IANA timezone name (e.g., 'America/New_York', 'Europe/London')
      type: object
      required:
        - type
        - at
        - timezone
      title: OneOffScheduleResponse
      description: >-
        One-time schedule response with timezone-aware datetime.


        The datetime is returned in the original timezone specified by the user,

        as a timezone-naive datetime (matching the input format).

        The UTC-stored datetime has been converted back to the original
        timezone.
    NotificationConfig:
      properties:
        type:
          type: string
          const: NOTIFICATION
          title: Type
          description: Schedule configuration type
        topic:
          type: string
          title: Topic
          description: >-
            Topic string describing where to publish notifications when the
            schedule triggers
        extra_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Data
          description: Optional extra data to include in the published notification payload
      type: object
      required:
        - type
        - topic
      title: NotificationConfig
      description: Configuration for notification-type schedules.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````