> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-prison/configuration/timetable.md).

# Timetable

The daily prison schedule on the in-game clock, with optional enforcement.

The prison runs a daily schedule on the **in-game (GTA) clock** — with the default 48-minute game day, a typical sentence experiences most of the rotation.

## Default schedule

Two meals a day, with a **Work Detail before each one** — the morning kitchen crew cooks lunch, the afternoon crew cooks dinner:

| In-game time | Slot        | Where prisoners should be                              |
| ------------ | ----------- | ------------------------------------------------------ |
| 00:00–06:00  | Lights Out  | Cells (enforced, **gates locked**)                     |
| 06:00–08:00  | Free Time   | Anywhere                                               |
| 08:00–12:00  | Work Detail | Kitchen (cooking **lunch**), laundry, workshop         |
| 12:00–13:00  | Lunch       | Mess hall                                              |
| 13:00–16:00  | Yard Time   | Yard / gym — solitary inmates get **out-of-cell time** |
| 16:00–19:00  | Work Detail | Kitchen (cooking **dinner**), laundry, workshop        |
| 19:00–20:00  | Dinner      | Mess hall                                              |
| 20:00–22:00  | Free Time   | Anywhere                                               |
| 22:00–24:00  | Lockdown    | Cells (enforced, **gates locked**)                     |

The kitchen shift opens **only** while a slot explicitly lists the kitchen zone — Free Time does not open it — and the locked-in recipe resets in the gap between the lunch and dinner windows, so each crew picks its own menu.

Every slot is a config entry — label, start/stop, allowed zones, PA announcement + sound, `enforce`, `enabled`, `lockCells`, and `meal` (`'lunch'` / `'dinner'`) marking the slot as that meal — the kitchen's serve announcement waits for it, and a meal slot that starts with nothing on the counter is announced as **no meal today**. Officers can also toggle slots live from the terminal's Timetable page.

## Slot changes

When a slot starts, the PA announces it (with a synthesized chime or alarm) and each prisoner gets a notification telling them where to report.

The schedule watches the clock on its own fast tick — `Config.Timetable.tickSeconds`, 5 real seconds, about 2.5 in-game minutes — so announcements land as the slot changes, not up to half an in-game hour later. Enforcement still sweeps at its own `checkInterval`.

## Solitary yard time

Slots flagged `yard = true` (Yard Time by default) give solitary inmates their out-of-cell hour: everyone in the hole is moved to the `Config.Locations.solitaryYard` spots — spread across them so they aren't stacked on one tile — and put back in their cells the moment the slot ends. Anyone **sent** to solitary during the slot joins the others in the corridor rather than sitting alone in a cell.

Solitary inmates are otherwise untouchable by movement systems: lockdowns, riots, the per-inmate LOCK DOWN button and the lights-out sweep all skip anyone whose status is `solitary` — the hole answers only to its own clock.

## Locking the cells

A slot flagged `lockCells = true` seals every cell gate **90 seconds after the slot begins** (`Config.Timetable.lockCellsDelay`), giving inmates time to walk back rather than stranding them in a corridor. The gates open again the moment a slot without the flag starts.

```lua
{ label = 'Lights Out', start = '00:00', stop = '06:00',
  zones = { 'cells_7', 'cells_6', 'cells_5' },
  announce = true, sound = 'chime', enforce = true, lockCells = true },
```

Outside those slots cells stand **unlocked** — see [Doors & Lockdowns](/mango5m-docs/resources/mango-prison/configuration/doors-and-lockdowns.md) for the full list of things that can seal a cell, and for the officer override that opens one anyway.

### The hard deadline

The walk-back window is the only notice inmates get. **The moment those doors seal**, any prisoner who is not in their own cell is teleported into it and written up:

```lua
lockCellsSweep = {
    enabled    = true,
    cellRadius = 3.0,     -- metres from their cell that counts as "in it"
    writeup    = true,    -- file a write-up (carries its own behaviour hit)
}
```

* It fires **once**, at the seal — not on every enforcement sweep.
* It measures against **their own cell**, not the block. Standing in the corridor at lights out is still out of bounds, because that is exactly where the doors would lock them out.
* Inmates in **medical, solitary or visitation** are left alone, as are those on a **job session** and — if `Config.Behaviour.trusty.ignoreTimetable` is on — trusties.
* The number returned to their cells is written to the audit log as `timetableLockdown`.

This runs alongside the ladder above, not instead of it: the warnings escalate during the grace period, and the sweep is the backstop when it expires.

## Enforcement

Slots with `enforce = true` punish prisoners caught outside the allowed zones after a grace period, on an escalating ladder per slot:

1. **Warning** notification
2. **Behaviour hit** + automatic write-up
3. **Sentence increase** (`enforcement.sentenceMinutes`)
4. **Teleport back** to the slot's zone — or **solitary** if `enforcement.solitaryMinutes > 0`

Prisoners with an active job session are exempt, and **trusty** inmates can be exempt entirely (`Config.Behaviour.trusty.ignoreTimetable`).

{% hint style="info" %}
Positions are verified **server-side** — the enforcement sweep reads the actual ped position, never a client report.
{% endhint %}
