How to Configure Automatic Server Restarts - Alderon-Games/pot-community-servers GitHub Wiki

Important Note: The server must be stopped while editing server files. You must save your edits and restart your server for any edits to take effect.

Configure Restarts through the Game.ini (Timed or Scheduled)

To change the configuration options, click on Files and navigate to the following path: Config/WindowsServer/Game.ini

Click on Game.ini to begin editing the file. Type out the server configurations options (below) to enable them. All of the lines entered into this file will affect your server. When you are happy with your server configuration options, click save. This method of setting server restarts is highly recommended, as it will warn players in-game when the player is going to restart.

Note: Each option must be on its own line or else it will not work.

Timed Restarts Configuration

bServerAutoRestart=true - Enables automatic server restarts.

RestartLengthInSeconds=10800 - Specifies the time between automatic server restarts in seconds.

Example Contents of Game.ini

[/Script/PathOfTitans.IGameSession]
bServerAutoRestart=true
RestartLengthInSeconds=10800

Scheduled Restarts Configuration

bServerAutoRestart=true - Enables automatic server restarts. bUseScheduledRestartTimes=true - The server will restart using local server time based on ScheduledRestartTimes +ScheduledRestartTimes=xxyy - xxyy = xx:yy = Hour:Minute (To add more than one scheduled restart time, just add as many lines as you need. See example) RestartLengthInSeconds=xx - In this case, this is ignored, because we are using scheduled restarts.

Example Contents of Game.ini

[/Script/PathOfTitans.IGameSession]
bServerAutoRestart=true
bUseScheduledRestartTimes=true
ScheduledRestartTimes=0300
ScheduledRestartTimes=0700
ScheduledRestartTimes=1100
ScheduledRestartTimes=1500
ScheduledRestartTimes=1900
ScheduledRestartTimes=2300

Configuring notification times (Works with both Timed and Scheduled restart configs.)

The defaults already are setup to notify every second during the last minute, then every hour for the last 6 hours, then every 6 hours beyond. No need to change this unless you want to customize the notification timing.

RestartNotificationTimestamps=xxxx - How many seconds before a restart should we warn players with a notification. (To add more than one notification time, just add as many lines as you need. See example)

Example Contents of Game.ini

[/Script/PathOfTitans.IGameSession]
bServerAutoRestart=true
RestartLengthInSeconds=10800
RestartNotificationTimestamps=240
RestartNotificationTimestamps=180
RestartNotificationTimestamps=120
RestartNotificationTimestamps=60
RestartNotificationTimestamps=30
RestartNotificationTimestamps=20
RestartNotificationTimestamps=10
RestartNotificationTimestamps=05