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

# Create a schedule

> Schedule a caller-named tool to run on a cadence — a run-ANY-tool door.

The caller supplies ``tool_name``, so reaching this is arbitrary-tool-execution
privilege (the recurring firing runs the named tool with real side effects). As a
"run any tool by name" door it is a tier-1 meta-executor, never projected to the MCP
surface — matching ``run_tool`` and ``submit_run``.



## OpenAPI

````yaml /openapi.json post /api/schedules
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/schedules:
    post:
      tags:
        - schedules
      summary: Create a schedule
      description: >-
        Schedule a caller-named tool to run on a cadence — a run-ANY-tool door.


        The caller supplies ``tool_name``, so reaching this is
        arbitrary-tool-execution

        privilege (the recurring firing runs the named tool with real side
        effects). As a

        "run any tool by name" door it is a tier-1 meta-executor, never
        projected to the MCP

        surface — matching ``run_tool`` and ``submit_run``.
      operationId: post_api_schedules
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
        '503':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ReloadingError'
                  - $ref: '#/components/schemas/Error'
          description: >-
            The server is applying a config reload, or a dependency this route
            needs is temporarily unavailable; retry shortly.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying; carried by the reloading
                answer.
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ScheduleCreate:
      description: >-
        Create a schedule that periodically runs ``tool_name`` with
        ``tool_kwargs``

        on the cadence in ``schedule_kwargs``.
      properties:
        schedule_kwargs:
          additionalProperties: true
          default: {}
          title: Schedule Kwargs
          type: object
        tool_kwargs:
          additionalProperties: true
          default: {}
          title: Tool Kwargs
          type: object
        tool_name:
          minLength: 1
          title: Tool Name
          type: string
      required:
        - tool_name
      title: ScheduleCreate
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
    ReloadingError:
      properties:
        error:
          const: reloading — the server is applying a config reload; retry shortly
          type: string
        reloading:
          const: true
          type: boolean
      required:
        - error
        - reloading
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````