---
title: "Run a task now"
method: POST
path: "/api/v1/scheduling/scheduler/tasks/{task_id}/run"
tags: ["Scheduling"]
---

# Run a task now

`POST /api/v1/scheduling/scheduler/tasks/{task_id}/run`

## Request

- Base URL: `https://pcp.example.com`
- URL: `https://pcp.example.com/api/v1/scheduling/scheduler/tasks/{task_id}/run`
- Auth: HTTP bearer

## Path parameters

- `task_id` string, required

## Query parameters

- `actor` string
- `organization_id` string, uuid

## Response `200`

OK

- TaskRunResponse: TaskRunResponse schema
  - `id` string, uuid
  - `job` object, nullable
    - `created_at` string, date-time
    - `error` string, nullable
    - `id` string, uuid
    - `schedule_at` string, date-time
    - `schedule_id` string, uuid
    - `started_at` string, date-time, nullable
    - `status` string
    - `stopped_at` string, date-time, nullable
    - `task` object
      - `config` unknown
      - `created_at` string, date-time
      - `edge_id` string, uuid
      - `edge_tags` string[], nullable
      - `id` string, uuid
      - `origin` object, nullable
        - `created_at` string, date-time
        - `data_classes` string[], nullable
        - `endpoints` object[]
          - `endpoint` string
        - `environment` string, nullable
        - `id` string, uuid
        - `integration` object
          - `created_at` string, date-time
          - `fields` object, nullable
          - `id` string, uuid
          - `name` string, nullable
          - `protocols` string[], nullable
          - `supports` string[], nullable
          - `updated_at` string, date-time
          - `version` string, nullable
        - `inventory` object, nullable
          - `id` string, uuid
          - `name` string
          - `residency` string, nullable
          - `type` string
        - `last_check` string, date-time, nullable
        - `location` string, nullable
        - `name` string
        - `protocol` string
        - `resource` object, nullable
          - `class` string
          - `configured_connectors` object[]
            - `country_detected` string, nullable
            - `id` string, uuid
            - `integration` object
              - …
            - `name` string
            - `residency` string, nullable
            - `type` string
          - `country_detected` string, nullable
          - `coverage_status` string
          - `excluded_from_coverage` boolean
          - `id` string, uuid
          - `inventory_id` string, uuid
          - `inventory_name` string
          - `inventory_type` string
          - `locked` boolean
          - `name` string
          - `residency` string, nullable
          - `service` string
          - `subclass` string
          - `tags` string[]
          - `urn` string
          - `urn_id` string, uuid
        - `revision` integer
        - `root` string
        - `temperature` string, nullable
        - `type` string
        - `updated_at` string, date-time
      - `schedule` object
        - `concurrency` integer, nullable
        - `enabled` boolean
        - `miss_strategy` string
        - `priority` integer, nullable
        - `rules` object[]
          - `enabled` boolean
          - `id` string, uuid
          - `jitter` integer, nullable
          - `journalized` boolean, nullable
          - `periodicity` integer, nullable
          - `start` string, date-time, nullable
      - `scheduler_actor` string, nullable
      - `scheduler_id` string, uuid
      - `scheduler_revision` integer
      - `sla_template` object, nullable
        - `id` string, uuid
        - `name` string
        - `temporalities` object, nullable
      - `target` object, nullable
        - `created_at` string, date-time
        - `data_classes` string[], nullable
        - `endpoints` object[]
          - `endpoint` string
        - `environment` string, nullable
        - `id` string, uuid
        - `integration` object
          - `created_at` string, date-time
          - `fields` object, nullable
          - `id` string, uuid
          - `name` string, nullable
          - `protocols` string[], nullable
          - `supports` string[], nullable
          - `updated_at` string, date-time
          - `version` string, nullable
        - `inventory` object, nullable
          - `id` string, uuid
          - `name` string
          - `residency` string, nullable
          - `type` string
        - `last_check` string, date-time, nullable
        - `location` string, nullable
        - `name` string
        - `protocol` string
        - `resource` object, nullable
          - `class` string
          - `configured_connectors` object[]
            - `country_detected` string, nullable
            - `id` string, uuid
            - `integration` object
              - …
            - `name` string
            - `residency` string, nullable
            - `type` string
          - `country_detected` string, nullable
          - `coverage_status` string
          - `excluded_from_coverage` boolean
          - `id` string, uuid
          - `inventory_id` string, uuid
          - `inventory_name` string
          - `inventory_type` string
          - `locked` boolean
          - `name` string
          - `residency` string, nullable
          - `service` string
          - `subclass` string
          - `tags` string[]
          - `urn` string
          - `urn_id` string, uuid
        - `revision` integer
        - `root` string
        - `temperature` string, nullable
        - `type` string
        - `updated_at` string, date-time
      - `type` string
      - `updated_at` string, date-time

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `401`: Missing, invalid or expired credentials
- `403`: The caller may not do this
- `500`: Internal Server Error _(panics)_
- `default`

---

[API](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1.md) - [All operations](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/revisions/2ac049494a01?raw)
