# DayZ Scheduled Server Messages & Auto-Restarts (messages.xml) (/docs/dayz/server-messages)



DayZ has a built-in message scheduler — no mod or external tool required. `messages.xml` controls **recurring announcements**, **welcome messages when players connect**, and **countdown timers that automatically shut the server down** for a scheduled restart.

File Location [#file-location]

It's in your active mission's `db/` folder:

```
mpmissions/dayzOffline.chernarusplus/db/messages.xml
```

Use the folder for the map you actually run (`dayzOffline.enoch` for Livonia, `dayzOffline.sakhal` for Sakhal).

Message Structure [#message-structure]

Each announcement is a `<message>` block. The tags:

| Tag         | Purpose                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------- |
| `delay`     | Seconds after server start before the message first fires.                                     |
| `repeat`    | Seconds between repeats (used with the repeat behaviour).                                      |
| `deadline`  | Countdown length in **minutes** (used with countdown/shutdown).                                |
| `shutdown`  | `1` = shut the server down when the countdown reaches zero.                                    |
| `onConnect` | `1` = show this message to a player when they connect.                                         |
| `text`      | The message text. Supports placeholders `#name` (server name) and `#tmin` (minutes remaining). |

Examples [#examples]

Welcome message on connect [#welcome-message-on-connect]

```xml
<message>
    <onConnect>1</onConnect>
    <text>Welcome to #name! Read the rules on our Discord.</text>
</message>
```

Recurring announcement every 30 minutes [#recurring-announcement-every-30-minutes]

```xml
<message>
    <delay>1800</delay>
    <repeat>1800</repeat>
    <text>Join our Discord for events and giveaways!</text>
</message>
```

Automatic 4-hour restart with countdown warnings [#automatic-4-hour-restart-with-countdown-warnings]

```xml
<message>
    <delay>0</delay>
    <repeat>0</repeat>
    <deadline>240</deadline>
    <onConnect>0</onConnect>
    <shutdown>1</shutdown>
    <text>#name will restart in #tmin minutes. Log out safely!</text>
</message>
```

`deadline` counts down from server start (240 minutes = 4 hours). With `shutdown` set to `1`, the server stops when it reaches zero — pair this with the panel's **auto-restart / crash detection** so it comes back up automatically.

> The `#tmin` placeholder is replaced with the minutes left on the countdown, so a single countdown message updates itself as time runs down.

Making Restarts Actually Loop [#making-restarts-actually-loop]

`messages.xml` only **stops** the server on schedule. To bring it back up, the panel restarts the process automatically when it exits (auto-restart on crash/stop). Combine a `shutdown` countdown with the panel's restart behaviour for a clean 3- or 4-hour restart cycle — DayZ servers benefit from regular restarts to clear memory and refresh the loot economy.

Editing Workflow [#editing-workflow]

1. Stop the server from the Console.
2. Edit `messages.xml` in the File Manager.
3. **Validate the XML** — an unclosed tag can stop messages loading.
4. Start the server.

Related Guides [#related-guides]

* [Central Economy & Loot (types.xml)](/docs/dayz/central-economy)
* [Server Configuration (serverDZ.cfg)](/docs/dayz/server-config)
* [Persistence & Time](/docs/dayz/persistence-settings)
