# Set scheduler mode
`PUT https://octopus.livepush.io/streams/{stream_id}/config/scheduler/mode`
Sets how the pre-recorded stream plays: `events` (scheduled events),
`infinity` (the playlist on air continuously) or `none` (off).

**This replaces the stream's whole scheduler configuration with the
mode alone.** The playlist, the looping setting and every scheduled
event, upcoming ones included, are cleared. Creating an event already
switches the stream to `events` mode, so you only need this call to
change modes deliberately.

Requires a token with the `streams.write` scope.
- **Tag:** Stream Scheduler
- **Operation ID:** `putStreamsStreamIdConfigSchedulerMode`
- **Authentication:** Bearer token required
- **Docs:** https://developers.livepush.io/stream-scheduler/set-scheduler-mode/

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `stream_id` | string | yes | Unique identifier of the pre-recorded live stream |


### Request body

`application/json` (required)

- `mode` (string) **required**


```json
{
  "mode": "events"
}
```


### Example request

```bash
curl -X PUT 'https://octopus.livepush.io/streams/<stream_id>/config/scheduler/mode' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "mode": "events"
  }'
```


### Responses


#### 200 — Mode set

- `success` (boolean)


```json
{
  "success": true
}
```


#### 401 — Unauthorized

