> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edevents/features/scheduler.md).

# Automatic Events (Scheduler)

```yaml
# config.yml
scheduler:
  enabled: true
  mode: INTERVAL              # INTERVAL or TIMES
  interval-min: 45m
  interval-max: 1h15m
  times: ["12:00", "18:00", "21:00"]
  timezone: system            # e.g. Europe/Madrid
  min-players: 1
  retry-interval: 5m
  avoid-repeat: true
  announce-before: [300, 60, 10]
  announce-sound: "BLOCK_NOTE_BLOCK_PLING 1 1.5"
  events: []
```

| Key               | Description                                                                                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`            | `INTERVAL`: a random event every `interval-min`..`interval-max`. `TIMES`: at the listed times of day (`HH:mm`, `timezone`); falls back to INTERVAL when `times` is empty. |
| `min-players`     | Online players required (each event may require more with its own `scheduler.min-players`).                                                                               |
| `retry-interval`  | When the event cannot start (not enough players, another event running) try again after this.                                                                             |
| `avoid-repeat`    | Never pick the same event twice in a row.                                                                                                                                 |
| `announce-before` | Seconds before the start at which `scheduler.starting-soon` (messages.yml) is broadcast with `{event}` and `{time}`.                                                      |
| `events`          | Only pick from these ids (empty = every event with `scheduler.enabled: true`).                                                                                            |

## Which event is picked

A weighted random choice among events with `scheduler.enabled: true`, `weight > 0`, enough players online and whose `cooldown` has passed. The choice is made when the countdown starts, so `%edevents_next_event%` shows what is coming.

## Commands

* `/events next` — time until the next automatic event.
* `/events skip` — start it now.
* `/events pause` / `/events resume` — pause the scheduler without touching the config.

Manually started events (`/events start`) do not affect the schedule; if a manual event is running when the timer fires, the automatic one is retried after `retry-interval`.
