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

# Create or replace a group's schedule

> Create the group's recurring schedule, or replace the existing one in place. Every time the schedule fires, a run of each enabled test in the group is queued. The scheduler entry is updated before the stored schedule, so a rejected cron leaves the current schedule running. Returns 201 when the group had no schedule and 200 when one was replaced. Web projects only: a mobile project's group returns 400.



## OpenAPI

````yaml /openapi.json put /v1/groups/{groupId}/schedule
openapi: 3.0.0
info:
  title: TestArmy API
  version: 1.0.0
  description: >-
    AI-powered browser automation API for QA testing. Automate web testing
    workflows using natural language prompts.
servers:
  - url: https://tester.army/api
    description: Production API server
security: []
paths:
  /v1/groups/{groupId}/schedule:
    put:
      tags:
        - Groups
      summary: Create or replace a group's schedule
      description: >-
        Create the group's recurring schedule, or replace the existing one in
        place. Every time the schedule fires, a run of each enabled test in the
        group is queued. The scheduler entry is updated before the stored
        schedule, so a rejected cron leaves the current schedule running.
        Returns 201 when the group had no schedule and 200 when one was
        replaced. Web projects only: a mobile project's group returns 400.
      parameters:
        - schema:
            type: string
            format: uuid
            description: Test group ID
          required: true
          description: Test group ID
          name: groupId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupScheduleRequest'
      responses:
        '200':
          description: Existing schedule replaced
          content:
            application/json:
              schema:
                type: object
                properties:
                  schedule:
                    $ref: '#/components/schemas/GroupSchedule'
                required:
                  - schedule
        '201':
          description: Schedule created
          content:
            application/json:
              schema:
                type: object
                properties:
                  schedule:
                    $ref: '#/components/schemas/GroupSchedule'
                required:
                  - schedule
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '404':
          description: Not Found - Resource does not exist or is not accessible
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '429':
          description: Too Many Requests - Usage limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '503':
          description: >-
            The scheduler did not answer or failed server-side; the current
            schedule is unchanged and the same payload can be retried
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '504':
          description: Gateway Timeout - Test execution exceeded time limit
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  schemas:
    GroupScheduleRequest:
      type: object
      properties:
        frequency:
          type: string
          enum:
            - every_1h
            - every_3h
            - every_6h
            - every_12h
            - daily
            - weekly
            - custom
          description: >-
            Preset cadence. The interval presets take `minute`; `daily` adds
            `hour`; `weekly` adds `hour` and `dayOfWeek`; `custom` takes
            `cronExpression`.
        minute:
          type: integer
          minimum: 0
          maximum: 59
          default: 0
          description: Minute of the hour (0-59). Defaults to 0. Ignored for custom.
        hour:
          type: integer
          minimum: 0
          maximum: 23
          description: Hour of the day (0-23) in `timezone`. Required for daily and weekly.
        dayOfWeek:
          type: integer
          minimum: 0
          maximum: 6
          description: 0 = Sunday through 6 = Saturday. Required for weekly.
        cronExpression:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Standard 5-field cron (minute hour day-of-month month day-of-week),
            e.g. "*/30 * * * *" for every 30 minutes. Seconds are not supported.
            Required for custom.
        timezone:
          type: string
          minLength: 1
          maxLength: 64
          default: UTC
          description: >-
            IANA timezone the schedule is evaluated in, e.g. "Europe/Warsaw".
            Defaults to UTC.
        name:
          type: string
          minLength: 1
          maxLength: 120
          description: Display name shown in the dashboard.
      required:
        - frequency
      additionalProperties: false
    GroupSchedule:
      type: object
      properties:
        id:
          type: string
          format: uuid
        groupId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        name:
          type: string
        frequency:
          type: string
          enum:
            - every_1h
            - every_3h
            - every_6h
            - every_12h
            - daily
            - weekly
            - custom
        minute:
          type: integer
          minimum: 0
          maximum: 59
        hour:
          type: integer
          nullable: true
          minimum: 0
          maximum: 23
        dayOfWeek:
          type: integer
          nullable: true
          minimum: 0
          maximum: 6
        timezone:
          type: string
          description: IANA timezone the cron is evaluated in.
        cronExpression:
          type: string
          description: >-
            The 5-field cron the scheduler runs, derived from the preset or
            given as custom.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - groupId
        - projectId
        - name
        - frequency
        - minute
        - hour
        - dayOfWeek
        - timezone
        - cronExpression
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication using Bearer token format

````