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

# Update

> Update a cron job's schedule, target, retries, concurrency, or enabled state.



## OpenAPI

````yaml /openapi.json patch /v1/orgs/{orgId}/projects/{projectId}/crons/{cronId}
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/crons/{cronId}:
    patch:
      tags:
        - crons
      summary: Update
      description: >-
        Update a cron job's schedule, target, retries, concurrency, or enabled
        state.
      operationId: crons.update
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: cronId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  pattern: ^[a-z][a-z0-9-]{1,61}$
                schedule:
                  type: string
                timezone:
                  type: string
                enabled:
                  type: boolean
                target:
                  description: >-
                    Exactly one same-environment target: a signed
                    project-relative HTTP invocation or a queue publication.
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - http
                        path:
                          type: string
                          pattern: ^/
                          description: >-
                            Project-relative HTTP path that receives a signed
                            invocation.
                        method:
                          type: string
                          enum:
                            - POST
                            - PUT
                            - PATCH
                        body:
                          description: >-
                            Optional JSON request body, at most 122,880 encoded
                            bytes before the signed 128,000-byte invocation
                            envelope.
                      required:
                        - kind
                        - path
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - queue
                        queueId:
                          type: string
                          description: >-
                            Queue id in the same project environment as this
                            cron job.
                        body:
                          description: >-
                            JSON queue body, at most 122,880 bytes before the
                            128,000-byte message envelope.
                      required:
                        - kind
                        - queueId
                        - body
                      additionalProperties: false
                retry:
                  type: object
                  properties:
                    maxAttempts:
                      type: integer
                      description: Total attempts from 1 to 10.
                    initialDelaySeconds:
                      type: integer
                      description: Initial retry delay from 1 to 3,600 seconds.
                    maxDelaySeconds:
                      type: integer
                      description: Maximum retry delay from 1 to 86,400 seconds.
                  additionalProperties: false
                concurrencyPolicy:
                  type: string
                  enum:
                    - allow
                    - skip
                    - replace
                timeoutSeconds:
                  type: integer
                  minimum: 1
                  maximum: 840
                  description: >-
                    Target timeout in seconds, bounded below the durable
                    execution lease.
              required: []
              additionalProperties: false
      responses:
        '200':
          description: Updated cron job.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                    pattern: ^[a-z][a-z0-9-]{1,61}$
                  environment:
                    type: string
                  schedule:
                    type: string
                    description: Five-field cron expression.
                  timezone:
                    type: string
                    description: IANA timezone name. Defaults to UTC.
                  enabled:
                    type: boolean
                  catchUp:
                    type: boolean
                    enum:
                      - false
                    description: >-
                      Missed invocations are skipped; catch-up is not performed
                      at launch.
                  target:
                    description: >-
                      Exactly one same-environment target: a signed
                      project-relative HTTP invocation or a queue publication.
                    oneOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - http
                          path:
                            type: string
                            pattern: ^/
                            description: >-
                              Project-relative HTTP path that receives a signed
                              invocation.
                          method:
                            type: string
                            enum:
                              - POST
                              - PUT
                              - PATCH
                          body:
                            description: >-
                              Optional JSON request body, at most 122,880
                              encoded bytes before the signed 128,000-byte
                              invocation envelope.
                        required:
                          - kind
                          - path
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - queue
                          queueId:
                            type: string
                            description: >-
                              Queue id in the same project environment as this
                              cron job.
                          body:
                            description: >-
                              JSON queue body, at most 122,880 bytes before the
                              128,000-byte message envelope.
                        required:
                          - kind
                          - queueId
                          - body
                        additionalProperties: false
                  retry:
                    type: object
                    properties:
                      maxAttempts:
                        type: integer
                        description: Total attempts from 1 to 10.
                      initialDelaySeconds:
                        type: integer
                        description: Initial retry delay from 1 to 3,600 seconds.
                      maxDelaySeconds:
                        type: integer
                        description: Maximum retry delay from 1 to 86,400 seconds.
                    additionalProperties: false
                  concurrencyPolicy:
                    type: string
                    enum:
                      - allow
                      - skip
                      - replace
                  timeoutSeconds:
                    type: integer
                    minimum: 1
                    maximum: 840
                    description: >-
                      Target timeout in seconds, bounded below the durable
                      execution lease.
                  lastRunAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  nextRunAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - name
                  - environment
                  - schedule
                  - timezone
                  - enabled
                  - catchUp
                  - target
                  - retry
                  - concurrencyPolicy
                  - timeoutSeconds
                  - lastRunAt
                  - nextRunAt
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '404':
          description: No such cron job in this project.
        '422':
          description: Invalid cron job configuration.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````