---
title: "Run a one-off task"
method: POST
path: "/api/v1/scheduling/scheduler/run"
tags: ["Scheduling"]
---

# Run a one-off task

`POST /api/v1/scheduling/scheduler/run`

## Request

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

## Query parameters

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

## Request body

- TaskRunRequest: TaskRunRequest schema
  - `config` object
    - `after` integer, nullable
    - `before` integer, nullable
    - `day` integer, nullable
    - `exec` object
      - `concurrency` integer
      - `cpu` integer
    - `format` string, nullable
    - `hooks` object
      - `post_job` string, nullable
      - `pre_job` string, nullable
    - `hour` integer, nullable
    - `ignores` string[], nullable
    - `labels` string[], nullable
    - `latest` boolean, nullable
    - `locate` object
      - `filters` object
        - `before` string, date-time, nullable
        - `category` string, nullable
        - `data_classes` string[], nullable
        - `dataset` string, nullable
        - `environment` string, nullable
        - `ids` string[], nullable
        - `ignore_tags` string[], nullable
        - `job` string, nullable
        - `latest` boolean, nullable
        - `name` string, nullable
        - `origins` string[], nullable
        - `perimeter` string, nullable
        - `roots` string[], nullable
        - `since` string, date-time, nullable
        - `tags` string[], nullable
        - `types` string[], nullable
      - `group_by` string, nullable
      - `periods` object
        - `day` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `friday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `hour` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `minute` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `monday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `month` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `saturday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `sunday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `thursday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `tuesday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `wednesday` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `week` object
          - `cap` integer, nullable
          - `keep` integer, nullable
        - `year` object
          - `cap` integer, nullable
          - `keep` integer, nullable
    - `minute` integer, nullable
    - `month` integer, nullable
    - `per_day` integer, nullable
    - `per_hour` integer, nullable
    - `per_minute` integer, nullable
    - `per_month` integer, nullable
    - `per_week` integer, nullable
    - `per_year` integer, nullable
    - `root` string, nullable
    - `snapshot_id` string, nullable
    - `snapshot_ids` string[], nullable
    - `week` integer, nullable
    - `year` integer, nullable
  - `edge_id` string, uuid
  - `edge_tags` string[], nullable
  - `origin_id` string, uuid
  - `run_at` string, date-time
  - `target_id` string, uuid
  - `type` string

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