About
ServerRestarter is a basic tool for making scheduled automated server restart. Automatic restart will help your server to keep resources (RAM) clean and have less lags, which appears, when different plugins have memory leaks.
It also provides ability to execute actions N seconds before restart:
- Play sound
- Chat broadcast
- Title broadcast
- Commands from console (including /stop or /restart)
Features
- No dependencies, no additional tools required
- Simple, easy-configurable
- Chat, Title, Sound, Commands before restart
- Crontask time based schedule
Commands
Spoiler: Commands
/srt reload
Description: Reload configuration
Permission: srt.reload
/srt check
Description: See next scheduled restart time
Permission: srt.check
/srt skip
Description: Skips scheduled restart to next one
Permission: srt.skip
/srt frestart [seconds]
Description: Schedule force restart in N seconds (or immediately if not specified)
Permission: srt.frestart
Description: Reload configuration
Permission: srt.reload
/srt check
Description: See next scheduled restart time
Permission: srt.check
/srt skip
Description: Skips scheduled restart to next one
Permission: srt.skip
/srt frestart [seconds]
Description: Schedule force restart in N seconds (or immediately if not specified)
Permission: srt.frestart
Configuration
Spoiler: config.yml
Code (Text):
# Run at 04:20:00 every day.
schedule:
- "0 20 4 * * ?"
# Actions to execute N seconds before restart.
# All fiels are optional, you can choose what do you want at each step.
# Available fields:
# - chat [MESSAGE]
# - title [TITLE :: SUBTITLE :: FADE_IN_TICKS :: STAY_TICKS :: FADE_OUT_TICKS]
# - sound [SOUND_NAME]
# - command [CONSOLE_COMMAND]
actions:
60:
- "chat | §7[§eServer§7] Restart in §c1 minute"
30:
- "chat | §7[§eServer§7] Restart in §c30 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §730 seconds left :: 40 40 40"
5:
- "chat | §7[§eServer§7] Restart in §c5 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §75 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
4:
- "chat | §7[§eServer§7] Restart in §c4 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §74 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
3:
- "chat | §7[§eServer§7] Restart in §c3 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §73 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
2:
- "chat | §7[§eServer§7] Restart in §c2 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §72 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
1:
- "chat | §7[§eServer§7] Restart in §c1 second"
- "title | §c-= §8[§eRestart§8] §c=- :: §71 second left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
0:
- "command | restart"
schedule:
- "0 20 4 * * ?"
# Actions to execute N seconds before restart.
# All fiels are optional, you can choose what do you want at each step.
# Available fields:
# - chat [MESSAGE]
# - title [TITLE :: SUBTITLE :: FADE_IN_TICKS :: STAY_TICKS :: FADE_OUT_TICKS]
# - sound [SOUND_NAME]
# - command [CONSOLE_COMMAND]
actions:
60:
- "chat | §7[§eServer§7] Restart in §c1 minute"
30:
- "chat | §7[§eServer§7] Restart in §c30 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §730 seconds left :: 40 40 40"
5:
- "chat | §7[§eServer§7] Restart in §c5 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §75 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
4:
- "chat | §7[§eServer§7] Restart in §c4 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §74 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
3:
- "chat | §7[§eServer§7] Restart in §c3 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §73 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
2:
- "chat | §7[§eServer§7] Restart in §c2 seconds"
- "title | §c-= §8[§eRestart§8] §c=- :: §72 seconds left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
1:
- "chat | §7[§eServer§7] Restart in §c1 second"
- "title | §c-= §8[§eRestart§8] §c=- :: §71 second left :: 15 40 1"
- "sound | UI_BUTTON_CLICK"
0:
- "command | restart"
My server just stops without restart
Please ensure, that you configured restart script properly in your spigot.yml configuration. Some server hostings does not allow such feature, so consider to migrate to better hosting if true.
How to use cron time?
Basically cron is a time-based job scheduler, depending on 6-7 variables.
* means "always" (every day, every minute etc)
? means "not specified" (day of week & day of month are not compatible, so one of them should be ?)
Examples:
0 0 12 * * ? - Every day at 12:00
0 15 14 * * ? - Every day at 14:15
0 0 0 ? * SUN - Every Sunday at 0:00
0 0 0/12 * * ? - Every 12 hours starting from 0 (0, 12, ...)
You must use at least first 6 variables!
For much more detailed information visit this Tutorial
Also nice tool to compile cron time: CronMaker
Please send issues in a PM or post it in Discussion section before rating the plugin!
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.13, 1.14, 1.15
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
ServerRestart [1.13-1.16] is a free Minecraft Java mod. Compatible with Minecraft 1.13, 1.14, 1.15, 1.16. Downloaded 9,052 times (via Spigot). Download it and open it directly in the game.