Simple Instructions: 2 Feature: Auto Restart - GeheimagentNr1/AutoRestart GitHub Wiki
The Auto Restart feature is the naming feature of the mod. With it, the server can be restarted at specified times.
Do you want to enable or disable this feature?
Enable Auto Restart
To enable the Auto Restart feature, you have to set [auto_restart, enabled] to true. We want that the server restarts at 0 o'clock (12 am), 6 o'clock (6 am), 12 o'clock (12 pm) and 18 o'clock (6pm) and it shall warn the players 2 hours (2h), 1 hour (1h), 30 minutes (30m), 15 minutes (15m), 10 minutes (10m), 5 minutes (5m), 2 minutes (2m), 1 minute (1m), 30 seconds (30s), 15 seconds (15s) and 10 down to 1 second (10s, 9s, ..., 1s) before an automatic restart. The server shall restart on crashes.
In our example, the config would look like this:
#Option for auto restarting:
[auto_restart]
#Times before an auto restart of the server, a restart warning should be shown.
#Examples:
# - 5s - For a message 5 seconds before a restart
# - 7m - For a message 7 minutes before a restart
# - 2h - For a message 2 hours before a restart
warning_times = ["2h", "1h", "30m", "15m", "10m", "5m", "2m", "1m", "30s", "15s", "10s", "9s", "8s", "7s", "6s", "5s", "4s", "3s", "2s", "1s"]
#Times in 24-hour format on which the server will automatically restart
times = ["00:00", "06:00", "12:00", "18:00"]
#Should the server be automatically restarted when it crashes.
on_crash = true
#Should the Server do automatic restarts?
enabled = true
Disable Auto Restart
To disable the Auto Restart feature, you only have to set [auto_restart, enabled] to false. The other options don't have to change.
In our example, the config would look like this:
#Option for auto restarting:
[auto_restart]
#Times before an auto restart of the server, a restart warning should be shown.
#Examples:
# - 5s - For a message 5 seconds before a restart
# - 7m - For a message 7 minutes before a restart
# - 2h - For a message 2 hours before a restart
warning_times = ["5s", "4s", "3s", "2s", "1s"]
#Times in 24-hour format on which the server will automatically restart
times = ["14:00", "16:32"]
#Should the server be automatically restarted when it crashes.
on_crash = false
#Should the Server do automatic restarts?
enabled = false
The second feature of the Auto Restart mod is to restart the server, if it's empty.
Empty Restart Feature