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

# Update a schedule

> Configure the schedule for the specified job.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-job-config.json put /job-config/jobs/{resource}/schedule
openapi: 3.0.1
info:
  title: Fusion Job Config API
  description: API for the Job Configuration and History of Lucidworks Fusion.
  contact:
    name: Lucidworks
    url: www.lucidworks.com
    email: support@lucidworks.com
  license:
    name: License of API
    url: https://lucidworks.com/legal/developer-license-agreement/
  version: '5.9'
servers:
  - url: https://{FUSION_HOST}
    description: Fusion
    variables:
      FUSION_HOST:
        default: FUSION_HOST
        description: Your environment host.
security: []
tags:
  - name: Manage task jobs
    description: Fetch, create, update, and delete task job configurations.
  - name: Manage all jobs
    description: Fetch, create, update, and delete task jobs and Spark jobs.
  - name: Manage job schedules
    description: Fetch, configure, and reset job schedules.
  - name: Get job histories
    description: Get the history of any job.
externalDocs:
  description: Lucidworks Documentation
  url: https://doc.lucidworks.com/
paths:
  /job-config/jobs/{resource}/schedule:
    put:
      tags:
        - Manage job schedules
      summary: Update a schedule
      description: Configure the schedule for the specified job.
      operationId: setJobConfig
      parameters:
        - name: resource
          in: path
          description: The job ID, prefixed with the job type, as in `spark:my-spark-job`.
          required: true
          schema:
            type: string
          example: task:refresh-autocomplete
        - name: validate
          in: query
          description: Validate that the job config exists.
          required: false
          schema:
            type: boolean
            default: true
        - name: context
          description: The app to which a job belongs, formatted as `app:APP_NAME`.
          example: app:api-test-app
          in: query
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobScheduleConfig'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/JobScheduleConfig'
              example:
                resource: task:refresh-autocomplete
                enabled: true
                triggers:
                  - type: interval
                    enabled: true
                    interval: 2
                    timeUnit: hour
                default: false
components:
  schemas:
    JobScheduleConfig:
      type: object
      properties:
        resource:
          type: string
        enabled:
          type: boolean
        triggers:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/CronTrigger'
              - $ref: '#/components/schemas/IntervalTrigger'
              - $ref: '#/components/schemas/JobChainTriggerConfig'
        default:
          type: boolean
      description: JSON-formatted configuration values
    CronTrigger:
      type: object
      allOf:
        - $ref: '#/components/schemas/JobTriggerConfig'
        - type: object
          properties:
            expression:
              type: string
    IntervalTrigger:
      type: object
      allOf:
        - $ref: '#/components/schemas/JobTriggerConfig'
        - type: object
          properties:
            interval:
              type: integer
              format: int32
            timeUnit:
              type: string
              enum:
                - second
                - minute
                - hour
                - day
                - week
                - month
            startTime:
              type: string
              format: date-time
    JobChainTriggerConfig:
      type: object
      allOf:
        - $ref: '#/components/schemas/JobTriggerConfig'
        - type: object
          properties:
            triggerType:
              type: string
              enum:
                - on_success
                - on_failure
                - on_success_or_failure
            otherJob:
              type: string
    JobTriggerConfig:
      type: object
      properties:
        enabled:
          type: boolean
        type:
          type: string
      discriminator:
        propertyName: type

````