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

# Update Cron

> Update an existing cron job.

Only provided fields are updated (partial patch). Returns the full
``Cron`` object after update.



## OpenAPI

````yaml /openapi.json patch /runs/crons/{cron_id}
openapi: 3.1.0
info:
  title: Aegra
  description: Production-ready Agent Protocol server
  version: 0.9.24
servers: []
security: []
tags:
  - name: Assistants
    description: A configured instance of a graph.
  - name: Threads
    description: Accumulated state and outputs from a group of runs.
  - name: Thread Runs
    description: Invoke a graph on a thread, updating its persistent state.
  - name: Stateless Runs
    description: Invoke a graph without state or memory persistence.
  - name: Crons
    description: Scheduled recurring runs on a cron schedule.
  - name: Store
    description: Persistent key-value and semantic storage available from any thread.
  - name: Event Streaming
    description: Agent Protocol v2 thread event streaming and commands.
  - name: Health
    description: Server health checks and service information.
paths:
  /runs/crons/{cron_id}:
    patch:
      tags:
        - Crons
      summary: Update Cron
      description: |-
        Update an existing cron job.

        Only provided fields are updated (partial patch). Returns the full
        ``Cron`` object after update.
      operationId: update_cron_runs_crons__cron_id__patch
      parameters:
        - name: cron_id
          in: path
          required: true
          schema:
            type: string
            title: Cron Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CronUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentProtocolError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CronUpdate:
      properties:
        schedule:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Schedule
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
        webhook:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Webhook
        interrupt_before:
          anyOf:
            - type: string
              const: '*'
            - items:
                type: string
              type: array
            - type: 'null'
          title: Interrupt Before
        interrupt_after:
          anyOf:
            - type: string
              const: '*'
            - items:
                type: string
              type: array
            - type: 'null'
          title: Interrupt After
        on_run_completed:
          anyOf:
            - type: string
              enum:
                - delete
                - keep
            - type: 'null'
          title: On Run Completed
        multitask_strategy:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Multitask Strategy
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        stream_mode:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Stream Mode
        stream_subgraphs:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stream Subgraphs
        timezone:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Timezone
      type: object
      title: CronUpdate
      description: Request body for updating an existing cron job.
    CronResponse:
      properties:
        cron_id:
          type: string
          title: Cron Id
        assistant_id:
          type: string
          title: Assistant Id
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        on_run_completed:
          anyOf:
            - type: string
              enum:
                - delete
                - keep
            - type: 'null'
          title: On Run Completed
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Time
        schedule:
          type: string
          title: Schedule
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        payload:
          additionalProperties: true
          type: object
          title: Payload
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        next_run_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Run Date
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        enabled:
          type: boolean
          title: Enabled
          default: true
      type: object
      required:
        - cron_id
        - assistant_id
        - schedule
        - created_at
        - updated_at
      title: CronResponse
      description: Response model matching the SDK ``Cron`` TypedDict.
    AgentProtocolError:
      properties:
        error:
          type: string
          title: Error
          description: Error type
        message:
          type: string
          title: Message
          description: Human-readable error message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Additional error details
      type: object
      required:
        - error
        - message
      title: AgentProtocolError
      description: Standard Agent Protocol error response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````