> ## 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.

# Resume a scheduled task

> Resume a paused task and calculate its next occurrence from the current time

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

Resuming a paused task calculates the next occurrence from the current time and does not replay every occurrence missed during the pause. A one-time schedule with no future occurrence returns `422` when resumed from a paused state

If a task was paused after an `interrupted` execution, inspect completed external actions before resuming to avoid duplicate effects


## OpenAPI

````yaml productions/api-reference/openapi/en/harness-runtime.json POST /harness/cronjobs/{job_id}/resume
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/{job_id}/resume:
    post:
      tags:
        - Harness Runtime cronjobs
      summary: Resume a scheduled task
      description: >-
        Resume a paused task and calculate its next occurrence from the current
        time
      operationId: harness_cronjob_resume
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-f0-9]{32}$
            title: Job Id
          description: Task ID containing 32 lowercase hexadecimal characters
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cronjob'
              example:
                name: daily-report
                prompt: Summarize recent activity
                schedule:
                  cron: 0 9 * * *
                  at: null
                  timezone: Asia/Shanghai
                enabled: true
                timeout_seconds: 1800
                misfire_policy: latest
                misfire_grace_seconds: 120
                harness: null
                cronjob_id: 0e58ff7f7dcbf348c252fc70e7fdb587
                revision: 3
                created_at: '2026-09-16T00:00:00Z'
                updated_at: '2026-09-16T00:00:00Z'
                next_run_at: '2026-09-16T01:00:00Z'
                active: null
                last_run: null
        '401':
          description: >-
            Missing or invalid service credentials required by the deployment
            gateway; the response format is gateway-defined
        '404':
          description: Task or execution not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronjobError'
              example:
                detail: Cronjob or execution not found
        '409':
          description: Concurrent modification conflict; retry the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronjobError'
              example:
                detail: Cronjob was modified concurrently; retry the request
        '422':
          description: Invalid request parameters, schedule, or idempotency key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CronjobRequestError'
              examples:
                field:
                  value:
                    detail:
                      - loc:
                          - path
                          - job_id
                        msg: String should match pattern
                        type: string_pattern_mismatch
                value:
                  value:
                    detail: Invalid request
      security:
        - HarnessServiceAuth: []
      x-codeSamples:
        - lang: cURL
          source: >-
            curl --request POST
            "${HARNESS_URL}/harness/cronjobs/${CRONJOB_ID}/resume" \
              --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"]}

            job_id = os.environ["CRONJOB_ID"]

            request = Request(base_url + f"/harness/cronjobs/{job_id}/resume",
            headers=headers, method="POST")

            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/${process.env.CRONJOB_ID}/resume`,
            {
              method: "POST",
              headers,
            });

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

            console.log(await response.json());
components:
  schemas:
    Cronjob:
      type: object
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          title: Name
          description: Task name, 1–128 characters
        prompt:
          type: string
          maxLength: 65536
          minLength: 1
          title: Prompt
          description: Message sent to the agent on each execution, 1–65536 characters
        schedule:
          $ref: '#/components/schemas/CronjobSchedule'
          description: Trigger schedule
        harness:
          anyOf:
            - $ref: '#/components/schemas/CronjobHarnessPublicOverrides'
            - type: 'null'
        enabled:
          type: boolean
          title: Enabled
          description: Whether future scheduling is enabled
        timeout_seconds:
          type: integer
          maximum: 10800
          minimum: 1
          title: Timeout Seconds
          description: >-
            Execution timeout in seconds; timeout records a failed execution
            without automatically retrying it
        misfire_policy:
          type: string
          enum:
            - latest
            - skip
          title: Misfire Policy
          description: >-
            latest runs the most recent missed occurrence; skip runs it only
            within the grace period. Neither policy replays every missed
            occurrence
        misfire_grace_seconds:
          type: integer
          maximum: 86400
          minimum: 0
          title: Misfire Grace Seconds
          description: Maximum lateness in seconds allowed by the skip policy
        cronjob_id:
          type: string
          description: Owning task ID
          pattern: ^[a-f0-9]{32}$
        revision:
          type: integer
          description: Task revision number
        created_at:
          type: string
          description: Task creation time in UTC
          format: date-time
        updated_at:
          type: string
          description: Most recent task update time in UTC
          format: date-time
        next_run_at:
          anyOf:
            - type: string
              description: >-
                Next scheduled occurrence in UTC; null when no future occurrence
                remains
              format: date-time
            - type: 'null'
        active:
          anyOf:
            - $ref: '#/components/schemas/CronjobRun'
            - type: 'null'
          description: >-
            The queued or running execution, or an execution whose final result
            is still being persisted
        last_run:
          anyOf:
            - $ref: '#/components/schemas/CronjobRunSummary'
            - type: 'null'
          description: Summary of the most recently persisted historical execution
      required:
        - name
        - prompt
        - schedule
        - harness
        - enabled
        - timeout_seconds
        - misfire_policy
        - misfire_grace_seconds
        - cronjob_id
        - revision
        - created_at
        - updated_at
        - next_run_at
        - active
        - last_run
    CronjobError:
      type: object
      properties:
        detail:
          type: string
          description: Error details
      required:
        - detail
    CronjobRequestError:
      type: object
      properties:
        detail:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/CronjobValidationError'
          description: Business validation message or a list of field validation errors
      required:
        - detail
    CronjobSchedule:
      properties:
        cron:
          anyOf:
            - type: string
            - type: 'null'
          title: Cron
          description: >-
            Five-field cron expression: minute, hour, day, month, and weekday;
            it must have an occurrence within the next eight years
        at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: At
          description: >-
            ISO 8601 timestamp including a timezone offset; must be in the
            future when creating an enabled task, mutually exclusive with cron
        timezone:
          type: string
          title: Timezone
          default: Asia/Shanghai
          description: >-
            IANA timezone used for cron; at uses its own offset, but this field
            must still be a valid timezone
      additionalProperties: false
      type: object
      title: Schedule
      description: >-
        A recurring or one-time schedule; exactly one of cron and at must be
        non-null
      oneOf:
        - required:
            - cron
          properties:
            cron:
              type: string
            at:
              type: 'null'
        - required:
            - at
          properties:
            at:
              type: string
              format: date-time
            cron:
              type: 'null'
    CronjobHarnessPublicOverrides:
      properties:
        model_name:
          type: string
          title: Model Name
          description: Reasoning model name used by this task
        tools:
          type: string
          title: Tools
          description: >-
            Comma-separated built-in tool names. See [Built-in
            tools](/productions/api-reference/preview/en/harness-runtime/tools)
            for all 13 names, their uses, and prerequisites in the default CLI
            0.54.0 deployment
        mcp_servers:
          type: array
          items:
            $ref: '#/components/schemas/CronjobMcpServerPublic'
          description: MCP services used by the task with credentials masked
        skills:
          type: string
          title: Skills
          description: >-
            Comma-separated SkillHub slugs, skill space IDs, or space:skill
            references
        system_prompt:
          type: string
          title: System Prompt
          description: Agent instructions for task execution
        runtime:
          type: string
          enum:
            - adk
            - codex
          title: Runtime
          description: Agent execution backend
        registry_space_id:
          type: string
          title: Registry Space Id
          description: A2A agent registry space ID
        registry_endpoint:
          type: string
          title: Registry Endpoint
          description: A2A agent registry endpoint
        registry_region:
          type: string
          title: Registry Region
          description: A2A agent registry region
        registry_top_k:
          type: integer
          minimum: 1
          title: Registry Top K
          description: Number of candidate agents to retrieve, at least 1
        max_llm_calls:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Llm Calls
          description: Maximum model calls per execution, at least 1
      additionalProperties: false
      type: object
      title: CronjobHarnessPublicOverrides
      description: >-
        Settings applied to each execution of this task; explicit fields
        override the deployed agent and omitted fields inherit it
    CronjobRun:
      type: object
      properties:
        cronjob_id:
          type: string
          description: Owning task ID
          pattern: ^[a-f0-9]{32}$
        run_id:
          type: string
          description: Execution ID used to read or cancel this occurrence
          pattern: ^[0-9]{13}-[a-f0-9]{20}$
        revision:
          type: integer
          description: Task revision used for this execution
        scheduled_at:
          type: string
          description: Scheduled occurrence time in UTC
          format: date-time
        created_at:
          type: string
          description: Execution record creation time in UTC
          format: date-time
        prompt:
          type: string
          description: Prompt for this execution
        harness:
          anyOf:
            - $ref: '#/components/schemas/CronjobHarnessPublicOverrides'
            - type: 'null'
        timeout_seconds:
          type: integer
          description: Timeout in seconds for this execution
        state:
          type: string
          description: Execution state
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
            - skipped
            - interrupted
        owner:
          anyOf:
            - type: string
              description: >-
                Identifier of the replica executing this occurrence; null before
                execution begins
            - type: 'null'
        started_at:
          anyOf:
            - type: string
              description: Execution start time in UTC; null before execution begins
              format: date-time
            - type: 'null'
        completed_at:
          anyOf:
            - type: string
              description: Execution completion time in UTC; null while unfinished
              format: date-time
            - type: 'null'
        lease_until:
          anyOf:
            - type: string
              description: >-
                Current execution lease expiry in UTC; null before execution
                begins
              format: date-time
            - type: 'null'
        cancel_requested:
          type: boolean
          description: Whether cancellation has been requested for this execution
        output:
          type: string
          description: >-
            Execution output; empty on failure. Successful output is limited to
            1 MiB
        error:
          type: string
          description: >-
            Failure, cancellation, skip, or interruption details; empty when
            there is no error
        coalesced_from:
          type: string
          description: >-
            Earliest missed occurrence combined into this run, in UTC; present
            only when occurrences were coalesced
          format: date-time
      required:
        - cronjob_id
        - run_id
        - revision
        - scheduled_at
        - created_at
        - prompt
        - harness
        - timeout_seconds
        - state
        - owner
        - started_at
        - completed_at
        - lease_until
        - cancel_requested
        - output
        - error
    CronjobRunSummary:
      type: object
      properties:
        run_id:
          type: string
          description: Execution ID used to read or cancel this occurrence
          pattern: ^[0-9]{13}-[a-f0-9]{20}$
        state:
          type: string
          description: Execution state
          enum:
            - succeeded
            - failed
            - cancelled
            - skipped
            - interrupted
        scheduled_at:
          type: string
          description: Scheduled occurrence time in UTC
          format: date-time
        completed_at:
          anyOf:
            - type: string
              description: Execution completion time in UTC; null while unfinished
              format: date-time
            - type: 'null'
        error:
          type: string
          description: >-
            Failure, cancellation, skip, or interruption details; empty when
            there is no error
      required:
        - run_id
        - state
        - scheduled_at
        - completed_at
        - error
    CronjobValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Location of the invalid field
        msg:
          type: string
          title: Message
          description: Validation message
        type:
          type: string
          title: Error Type
          description: Validation error code
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CronjobMcpServerPublic:
      properties:
        protocol:
          type: string
          enum:
            - streamable-http
            - sse
          title: Protocol
          description: MCP transport protocol
        endpoint:
          type: string
          title: Endpoint
          description: >-
            HTTP(S) URL without username, password, fragment, or control
            characters
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A configured non-empty credential is returned as ********; omitted
            credentials may be absent or null
      additionalProperties: false
      type: object
      required:
        - endpoint
      title: CronjobMcpServerPublic
      description: A remote MCP service available to this task
  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

````