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

# Get scheduler status

> Inspect scheduling, running execution count, and the most recent scan on the replica serving this request

Requires a Harness Runtime deployed with AgentKit CLI 0.54.0 and [scheduled tasks enabled](/productions/api-reference/preview/en/harness-runtime/cronjobs/overview)

This endpoint describes only the replica serving the request. Different requests can report different replicas in a deployment with multiple replicas. `last_error` is the most recently recorded scheduling error and is not guaranteed to clear immediately after a successful scan


## OpenAPI

````yaml productions/api-reference/openapi/en/harness-runtime.json GET /harness/cronjobs/status
openapi: 3.1.0
info:
  title: Harness Runtime
  version: agentkit-cli 0.54.0 / SDK 0.8.0 / ADK 2.2.0
  description: >-
    Harness Runtime deployed by AgentKit CLI 0.54.0, verified with VeADK 1.0.8,
    AgentKit SDK 0.8.0, and Google ADK 2.2.0; scheduled tasks require separate
    enablement
servers:
  - url: http://localhost:8000
    description: Local server
security:
  - {}
  - RuntimeBearer: []
tags:
  - name: Service and applications
  - name: Sessions
  - name: Agent execution
  - name: Artifacts
  - name: Memory
  - name: Evaluation · development server
  - name: Debugging · development server
  - name: Compatibility endpoints
  - name: Harness cronjobs
paths:
  /harness/cronjobs/status:
    get:
      tags:
        - Harness Runtime cronjobs
      summary: Get scheduler status
      description: >-
        Inspect scheduling, running execution count, and the most recent scan on
        the replica serving this request
      operationId: harness_cronjob_status
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronjobStatus'
              example:
                replica_id: replica-1
                running: 0
                concurrency: 8
                last_scan_at: null
                last_error: null
                active: false
        '401':
          description: >-
            Missing or invalid service credentials required by the deployment
            gateway; the response format is gateway-defined
      security:
        - HarnessServiceAuth: []
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET "${HARNESS_URL}/harness/cronjobs/status" \
              --header "Authorization: Bearer ${HARNESS_TOKEN}"
        - lang: Python
          source: >-
            import json

            import os

            from urllib.request import Request, urlopen


            base_url = os.environ["HARNESS_URL"]

            headers = {"Authorization": "Bearer " + os.environ["HARNESS_TOKEN"]}


            request = Request(base_url + f"/harness/cronjobs/status",
            headers=headers, method="GET")

            with urlopen(request) as response:
                print(json.load(response))
        - lang: JavaScript
          source: >-
            const baseUrl = process.env.HARNESS_URL;

            const headers = { Authorization: `Bearer
            ${process.env.HARNESS_TOKEN}` };

            const response = await fetch(`${baseUrl}/harness/cronjobs/status`, {
              method: "GET",
              headers,
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
components:
  schemas:
    CronjobStatus:
      type: object
      properties:
        replica_id:
          type: string
          description: Identifier of the replica serving this request
        running:
          type: integer
          description: Number of executions currently running on this replica
        concurrency:
          type: integer
          description: Concurrency limit for this replica
        last_scan_at:
          anyOf:
            - type: string
              description: >-
                Most recent completed scan on this replica in UTC; null before
                the first scan
              format: date-time
            - type: 'null'
        last_error:
          anyOf:
            - type: string
              description: >-
                Most recently recorded scheduling error identifier on this
                replica; null if none has been recorded
            - type: 'null'
        active:
          type: boolean
          description: >-
            Whether this replica’s background scheduling is active; this is not
            a cluster-wide health result
      required:
        - replica_id
        - running
        - concurrency
        - last_scan_at
        - last_error
        - active
  securitySchemes:
    RuntimeBearer:
      type: http
      scheme: bearer
      description: >-
        Optional locally without a gateway; cloud deployments use the Runtime
        API key or user-pool JWT required by that deployment, never the model
        API key
    HarnessServiceAuth:
      type: http
      scheme: bearer
      description: >-
        Runtime access credential for a service-authenticated Harness, such as a
        Runtime API key; shared OAuth deployments do not support background
        scheduled tasks

````