Restart
Description
Schedules daily server restarts, warns players before disconnecting them and requests server shutdown. A process supervisor or hosting panel must launch the server again after it exits.
Configuration
Default configuration
Restart.json
json
{
"m_Enable": 0,
"m_Schedules": [
{
"m_Hour": 2,
"m_Minute": 0,
"m_Active": 1
},
{
"m_Hour": 6,
"m_Minute": 0,
"m_Active": 1
},
{
"m_Hour": 10,
"m_Minute": 0,
"m_Active": 1
},
{
"m_Hour": 14,
"m_Minute": 0,
"m_Active": 1
},
{
"m_Hour": 18,
"m_Minute": 0,
"m_Active": 1
},
{
"m_Hour": 22,
"m_Minute": 0,
"m_Active": 1
}
],
"m_Await": 2,
"m_Reason": "The server is restarting. Wait a few minutes.",
"m_Notification": "The server will restart in %TimeMinutes% minutes.",
"m_Interval": [
15,
10,
5,
1
],
"m_Webhook": ""
}Options
| Option | Type | Description |
|---|---|---|
m_Enable | bool | Enables the module with 1 and disables it with 0. |
m_Schedules | array<object> | Daily schedules based on the server clock. |
m_Await | int | Period in minutes between the start of the restart procedure and server exit. Players are disconnected during this period. |
m_Reason | string | Text shown to players disconnected during the restart procedure. |
m_Notification | string | Advance warning text. The module replaces %TimeMinutes% with minutes until the restart procedure starts. |
m_Interval | array<int> | Minutes before the restart procedure at which an advance warning is sent. |
m_Webhook | string | Discord webhook URL for advance warnings. Leave empty to disable delivery. |
m_Schedules[]
| Option | Type | Description |
|---|---|---|
m_Hour | int | Hour on the server clock. |
m_Minute | int | Minute within the scheduled hour. |
m_Active | bool | Enables the schedule with 1 and disables it with 0. |
Commands
/restart
The action is required. now starts the disconnect-and-shutdown procedure and waits m_Await before exiting. force requests server exit after two seconds. start resumes scheduled restarts, and stop pauses the schedule before the procedure starts. Use now or force only when you intend to interrupt the active session.
- Syntax
/restart <force|now|start|stop>. - Permission
command.restartorroot. - Example
/restart now.
Permissions
Add command.restart to the group's m_Permissions in Permissions to manage the restart schedule or request shutdown through chat. The root permission also grants access.
