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

# スケジュールを実行する

> 1 つの Schedule Run を手動でトリガーします。

`POST /api/v1/forward/schedules/{schedule_id}/run`

Schedule のトリガーポリシーを変更せずに、Schedule Run を即座に作成します。このエンドポイントは、実行の完了時ではなく Run レコードの作成時に応答を返します。

## Headers

| Header            | Required | Description                     |
| ----------------- | -------- | ------------------------------- |
| `Authorization`   | Yes      | `Bearer <PAT>`                  |
| `Content-Type`    | No       | ボディを送信する場合は `application/json`。 |
| `Idempotency-Key` | No       | 安全でないリクエスト向けの任意のべき等キー。          |

## Path parameters

| Parameter     | Type   | Required | Description          |
| ------------- | ------ | -------- | -------------------- |
| `schedule_id` | string | Yes      | Forward Schedule ID。 |

## Example request

```bash theme={null}
curl -s -X POST 'https://api.qoder.com/api/v1/forward/schedules/sched_019f00112233445566778899aabbccdd/run' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "srun_019f00112233445566778899aabbccdd",
  "schedule_id": "sched_019f00112233445566778899aabbccdd",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_support",
  "session_id": null,
  "status": "pending",
  "trigger_context": {
    "type": "manual"
  },
  "error": null,
  "result_payload": null,
  "push_sink": null,
  "push_status": "skipped",
  "attempt": 1,
  "triggered_at": "2026-06-22T12:00:00Z",
  "started_at": null,
  "completed_at": null,
  "duration_ms": null,
  "created_at": "2026-06-22T12:00:00Z"
}
```

## Response fields

作成された Schedule Run オブジェクトを返します。

## Errors

| HTTP | Type                    | Code                      | Trigger              |
| ---- | ----------------------- | ------------------------- | -------------------- |
| 401  | `authentication_error`  | `authentication_required` | PAT が無効または期限切れです。    |
| 404  | `not_found_error`       | `schedule_not_found`      | Schedule が存在しません。    |
| 409  | `invalid_request_error` | `schedule_archived`       | Schedule はアーカイブ済みです。 |
| 409  | `invalid_request_error` | `schedule_not_active`     | Schedule は一時停止中です。   |

## Notes

* Schedule が `execution.max_concurrent_runs` に達している場合でも、Forward は `status=skipped` および `error.type=concurrency_limit_reached` の Run を作成します。
* `status` が `completed`、`failed`、または `skipped` になるまで Get Schedule Run をポーリングしてください。

## Related

<CardGroup cols={2}>
  <Card title="スケジュール実行を取得する" icon="file-lines" href="/cloud-agents/api/forward/schedule-runs/get" />

  <Card title="スケジュール実行を一覧表示する" icon="history" href="/cloud-agents/api/forward/schedule-runs/list" />
</CardGroup>
