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

# Update schedule

> Pause with `{ "enabled": false }`, resume with `{ "enabled": true }`, or change the time, timezone, overlap, name or spec. Sending `run_at` makes it a one-off and `cron` makes it repeating.



## OpenAPI

````yaml /api-reference/openapi.json patch /schedules/{id}
openapi: 3.1.0
info:
  title: Runcrate API
  version: 1.0.0
  summary: OpenAI-compatible inference API + GPU infrastructure API.
  description: >-
    Runcrate exposes two API surfaces. The inference API at
    `https://api.runcrate.ai/v1` is OpenAI-compatible: it accepts the standard
    OpenAI SDK with the base URL changed. The infrastructure API at
    `https://www.runcrate.ai/api/v1` manages GPU instances, jobs, persistent
    volumes, environments, SSH keys, templates, and billing. Both share a single
    `rc_live_*` API key.


    Pricing is per-token, per-image, per-second, or per-minute on the inference
    API (varies by model; see https://www.runcrate.ai/api/models/catalog for
    live rates) and per-second on GPU rentals (see
    https://www.runcrate.ai/pricing for hourly rates per GPU class).


    All infrastructure API responses are wrapped in `{ "data": ... }`. List
    responses also include a `meta` object with pagination cursors. Error
    responses use `{ "error": { "code": "...", "message": "..." } }`.
  termsOfService: https://www.runcrate.ai/terms
  contact:
    name: Runcrate
    url: https://www.runcrate.ai/contact
  license:
    name: Proprietary
    url: https://www.runcrate.ai/terms
servers:
  - url: https://api.runcrate.ai/v1
    description: Inference API (OpenAI-compatible)
  - url: https://www.runcrate.ai/api/v1
    description: >-
      Infrastructure API (instances, jobs, storage, environments, ssh-keys,
      templates, billing)
security:
  - ApiKeyAuth: []
tags:
  - name: Chat
    description: OpenAI-compatible chat completions.
  - name: Images
    description: Text-to-image generation.
  - name: Videos
    description: Async text-to-video and image-to-video generation.
  - name: Audio
    description: Text-to-speech and speech-to-text.
  - name: Embeddings
    description: Vector embeddings for RAG and search.
  - name: Models
    description: Model catalog discovery.
  - name: Instances
    description: GPU instance lifecycle.
  - name: Jobs
    description: >-
      Run one command on its own GPU machine. The machine stops, and billing
      ends, when the command exits.
  - name: Schedules
    description: >-
      Start an instance or a job later: once at a set time, or on a repeating
      cron schedule in your timezone.
  - name: Storage
    description: Persistent volume management.
  - name: Environments
    description: Resource isolation containers within a workspace.
  - name: Secrets
    description: >-
      Names of the secrets an environment's machines get. Values are set in the
      dashboard and never returned.
  - name: SSH Keys
    description: SSH key management for instance access.
  - name: Templates
    description: Pre-built instance images and configurations.
  - name: Billing
    description: Credit balance, transactions, usage metrics.
paths:
  /schedules/{id}:
    servers:
      - url: https://www.runcrate.ai/api/v1
    patch:
      tags:
        - Schedules
      summary: Update schedule
      description: >-
        Pause with `{ "enabled": false }`, resume with `{ "enabled": true }`, or
        change the time, timezone, overlap, name or spec. Sending `run_at` makes
        it a one-off and `cron` makes it repeating.
      operationId: updateSchedule
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleUpdateRequest'
      responses:
        '200':
          description: Updated schedule.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Schedule'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            `conflict`: you resumed a one-off whose time has passed. Send a new
            `run_at` with `enabled: true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    ScheduleUpdateRequest:
      type: object
      description: >-
        Send any of these. `run_at` turns the schedule into a one-off (clears
        `cron`); `cron` makes it repeating (clears `run_at`). `spec` replaces
        the whole spec, so send environment variable values again.
      properties:
        enabled:
          type: boolean
          description: >-
            `false` pauses. `true` resumes and makes the schedule run as you
            from now on: a repeating schedule runs at its next occurrence from
            now; a one-off runs at its `run_at`, which must still be in the
            future.
        run_at:
          type: string
          format: date-time
        cron:
          type: string
        timezone:
          type: string
        overlap:
          type: string
          enum:
            - skip
            - allow
        name:
          type: string
          minLength: 1
          maxLength: 63
        spec:
          type: object
          additionalProperties: true
    Schedule:
      type: object
      required:
        - id
        - name
        - kind
        - environment_id
        - created_by
        - spec
        - max_runtime_minutes
        - timezone
        - overlap
        - enabled
        - run_count
        - created_at
        - updated_at
      description: >-
        Starts an instance or a job later: once at `run_at`, or on every
        occurrence of `cron` in `timezone`. Runcrate checks schedules every 2
        minutes, so a run starts within about 2 minutes of its time, as `run_as`
        through `run_as_credential`, in the environment it was created in. When
        many schedules are due at once, each workspace gets its turn.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
          maxLength: 63
          description: Defaults to `spec.name`, or `instance-schedule` / `job-schedule`.
        kind:
          type: string
          enum:
            - instance
            - job
          description: What each run starts.
        environment_id:
          type: string
          format: uuid
        created_by:
          type: string
          format: uuid
          description: The user who created the schedule. Never changes.
        run_as:
          type: string
          format: uuid
          nullable: true
          description: >-
            The user every run launches as: the creator, or whoever last changed
            `spec`, `run_at`, `cron` or `timezone`, changed `overlap`, or
            resumed the schedule. Pausing or renaming does not change it. If
            they leave the workspace, the schedule is paused with `last_status:
            no_access`.
        run_as_credential:
          type: string
          enum:
            - user
            - api_key
            - agent
          description: >-
            How `run_as` set the schedule up: `user` (signed in to the
            dashboard), `api_key`, or `agent` (an MCP or CLI agent sign-in).
            Before each run the API key must still be active and in this
            environment, and an agent sign-in must not have ended; otherwise the
            schedule is paused with `last_status: credential_revoked`.
        spec:
          type: object
          additionalProperties: true
          description: >-
            The create body each run sends: a `POST /jobs` body for `kind: job`,
            a `POST /instances` body for `kind: instance`. Environment variable
            values are write-only: `env` (job) and `env_vars` (instance) are
            returned as `env_keys`, the names only. Everything else, including
            `launch_script` and `startup_commands`, is returned to everyone with
            access to the environment. Keep tokens and passwords in the
            environment's secrets (set in the dashboard), not in a schedule.
        max_runtime_minutes:
          type: integer
          minimum: 1
          description: >-
            Copied from `spec.max_runtime_minutes`, which every schedule
            requires. Read-only here: change it in `spec`.
        run_at:
          type: string
          format: date-time
          nullable: true
          description: 'One-off: when it runs. Null on a repeating schedule.'
        cron:
          type: string
          nullable: true
          description: >-
            Repeating: a 5-field cron expression (`minute hour day-of-month
            month day-of-week`) read in `timezone`. Null on a one-off.
        timezone:
          type: string
          default: UTC
          description: >-
            IANA timezone, e.g. `Europe/London`. On a one-off it is only used to
            show the time.
        overlap:
          type: string
          enum:
            - skip
            - allow
          default: skip
          description: >-
            Repeating only. `skip`: a run is skipped while the instance or job
            from the previous run is still live. `allow`: every run starts.
        enabled:
          type: boolean
          description: False when paused. A one-off pauses itself once it has run.
        next_run_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            The next time it runs. Null when paused or when a one-off has
            already run.
        last_run_at:
          type: string
          format: date-time
          nullable: true
        last_status:
          type: string
          nullable: true
          enum:
            - launched
            - failed
            - skipped_budget
            - skipped_overlap
            - no_access
            - credential_revoked
            - null
          description: >-
            Result of the last run. `launched`: the instance or job started.
            `failed`: the launch failed (`last_error` says why); the 5th failed
            scheduled run in a row also pauses the schedule. `skipped_budget`:
            the environment's monthly budget was spent. `skipped_overlap`: the
            previous run was still live and `overlap` is `skip`. `no_access`:
            `run_as` is no longer in the workspace, so the schedule was paused.
            `credential_revoked`: the API key behind it was revoked or is no
            longer in this environment, or the agent sign-in ended, so the
            schedule was paused. Resuming makes it run as whoever resumed it.
        last_error:
          type: string
          nullable: true
        last_instance_id:
          type: string
          format: uuid
          nullable: true
          description: 'Instance started by the last run (`kind: instance`).'
        last_job_id:
          type: string
          format: uuid
          nullable: true
          description: 'Job started by the last run (`kind: job`).'
        run_count:
          type: integer
          minimum: 0
          description: Runs so far, including `run-now`.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code (e.g. `validation_error`,
                `unauthorized`, `not_found`, `insufficient_credits`,
                `rate_limited`, `internal_error`).
            message:
              type: string
              description: Human-readable error message.
            details:
              type: object
              additionalProperties: true
              description: Optional structured error context.
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: Request shape or values failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Use a Runcrate API key with the `rc_live_*` prefix as the bearer token.
        Create one at https://www.runcrate.ai/dashboard/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.