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

# List scheduled test jobs

> Returns the scheduled test jobs in your organization, optionally filtered by test agent. A scheduled job runs selected scenarios on a cron expression.



## OpenAPI

````yaml /openapi/source/external/inference/inference-ai-tests.json get /ai/tests/schedules/v1/cron-jobs
openapi: 3.1.0
info:
  version: 2.0.0
  title: Telnyx API
  x-latency-category: responsive
  x-endpoint-cost: light
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: AI Tests
    description: >-
      Test agents, evaluator scenarios, metrics, and run results for the AI test
      framework.
paths:
  /ai/tests/schedules/v1/cron-jobs:
    get:
      tags:
        - AI Tests
      summary: List scheduled test jobs
      description: >-
        Returns the scheduled test jobs in your organization, optionally
        filtered by test agent. A scheduled job runs selected scenarios on a
        cron expression.
      operationId: list_scheduled_test_jobs
      parameters:
        - name: agent_id
          in: query
          required: false
          description: Filter jobs belonging to the specified test agent.
          schema:
            type: integer
      responses:
        '200':
          description: List of scheduled test jobs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTestJobListResponse'
              example:
                - id: 1188
                  name: Nightly regression
                  agent: 1259
                  crontab_expression: 0 3 * * *
                  timezone: America/Chicago
                  scenario_ids:
                    - 9512
                  scenarios_data:
                    - id: 9512
                      agent: 1259
                      name: Refund escalation flow
                      personality: 4643
                      personality_name: Interruptive (High)
                  personality: null
                  personalities:
                    - 4643
                  tags:
                    - regression
                  frequency: 1
                  run_as_text: false
                  execution_mode: voice
                  notify_on: failure
                  is_active: true
                  created_at: '2026-10-13T18:04:05.123456Z'
                  updated_at: '2026-10-13T18:04:05.123456Z'
        '400':
          description: Bad Request. The AI Tests service rejected the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10015'
                    title: Bad Request
                    detail: The AI Tests service rejected the request.
        '401':
          description: Unauthorized. Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10003'
                    title: Unauthorized
                    detail: The API key is missing or invalid.
        '404':
          description: >-
            Not Found. The requested resource does not exist or is not enabled
            for your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10005'
                    title: Not Found
                    detail: The requested resource or URL could not be found.
        '422':
          description: Unprocessable Entity. A validation error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10018'
                    title: Unprocessable Entity
                    detail: Validation failed for the request payload.
        '429':
          description: Too Many Requests. The AI Tests service rate-limited the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10029'
                    title: Too Many Requests
                    detail: Too many requests; retry later.
        '503':
          description: Service Unavailable. The AI Tests service is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiTestsErrorResponse'
              example:
                errors:
                  - code: '10063'
                    title: Service Unavailable
                    detail: The test framework service is temporarily unavailable.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.ai.tests.schedules.v1.cronJobs.retrieveCronJobs();


            console.log(response.data);
        - lang: Python
          source: >
            import os

            from telnyx import Telnyx


            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )

            response =
            client.ai.tests.schedules.v1.cron_jobs.retrieve_cron_jobs()

            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.AI.Tests.Schedules.V1.CronJobs.GetCronJobs(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    var response = client.ai().tests().schedules().v1().cronJobs().retrieveCronJobs();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.ai.tests.schedules.v1.cron_jobs.retrieve_cron_jobs

            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $response = $client->ai->tests->schedules->v1->cronJobs->retrieveCronJobs();

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:tests:schedules:v1:cron-jobs retrieve-cron-jobs \
              --api-key 'My API Key'
components:
  schemas:
    ScheduledTestJobListResponse:
      type: array
      items:
        $ref: '#/components/schemas/ScheduledTestJob'
      example:
        - id: 1188
          name: Nightly regression
          agent: 1259
          crontab_expression: 0 3 * * *
          timezone: America/Chicago
          scenario_ids:
            - 9512
          scenarios_data:
            - id: 9512
              agent: 1259
              name: Refund escalation flow
              personality: 4643
              personality_name: Interruptive (High)
          personality: null
          personalities:
            - 4643
          tags:
            - regression
          frequency: 1
          run_as_text: false
          execution_mode: voice
          notify_on: failure
          is_active: true
          created_at: '2026-10-13T18:04:05.123456Z'
          updated_at: '2026-10-13T18:04:05.123456Z'
    AiTestsErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Telnyx error code.
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
            required:
              - code
              - title
      required:
        - errors
    ScheduledTestJob:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        agent:
          type: integer
          description: ID of the test agent the job belongs to.
        crontab_expression:
          type: string
          description: >-
            Cron expression controlling when the job runs, in the job's
            timezone.
        timezone:
          type: string
        scenario_ids:
          type: array
          items:
            type: integer
          description: Scenario IDs the job executes.
        scenarios_data:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              agent:
                type: integer
              name:
                type: string
              personality:
                type:
                  - integer
                  - 'null'
              personality_name:
                type: string
        personality:
          type:
            - integer
            - 'null'
        personalities:
          type: array
          items:
            type: integer
        tags:
          type: array
          items:
            type: string
        frequency:
          type: integer
        run_as_text:
          type: boolean
          description: Whether the job runs scenarios as text chat rather than voice calls.
        execution_mode:
          type: string
          description: Execution mode for the test runs, such as voice, text, or sip.
        notify_on:
          type: string
          enum:
            - never
            - success
            - failure
            - both
          description: When the job sends a notification.
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - agent
        - crontab_expression
        - is_active
        - created_at
        - updated_at
      example:
        id: 1188
        name: Nightly regression
        agent: 1259
        crontab_expression: 0 3 * * *
        timezone: America/Chicago
        scenario_ids:
          - 9512
        scenarios_data:
          - id: 9512
            agent: 1259
            name: Refund escalation flow
            personality: 4643
            personality_name: Interruptive (High)
        personality: null
        personalities:
          - 4643
        tags:
          - regression
        frequency: 1
        run_as_text: false
        execution_mode: voice
        notify_on: failure
        is_active: true
        created_at: '2026-10-13T18:04:05.123456Z'
        updated_at: '2026-10-13T18:04:05.123456Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````