---
title: "Nightly Step"
method: POST
path: "/api/tasks/nightly-step"
tags: ["Tasks", "Tasks"]
---

# Nightly Step

`POST /api/tasks/nightly-step`

One link of the A2 nightly chain: run a single step under its own
scheduler_runs row, then enqueue the next step. Always returns 200 —
the chain (not Cloud Tasks retries) controls flow: a fatal-step failure
ends the chain; a non-fatal failure logs and continues.

## Headers

- `x-cloudscheduler-secret` string, nullable
- `x-scheduler-secret` string, nullable
- `authorization` string, nullable

## Request body

- NightlyStepBody — Body for /api/tasks/nightly-step. Sent by _enqueue_nightly_step.
  - `step` integer, required

## Response `200`

Successful Response

- unknown

## Other responses

- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.dev/primetime/apis/primetime-media-api.md) · [All operations](https://skmtc.dev/primetime/apis/primetime-media-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primetime/primetime-media-api/revisions/9da9a9f64e11/schema)
