How to set up an automatic daily restart
A daily restart frees up memory and helps servers that run for a long time with lots of plugins. You set it up once in the Schedules tab.
How to create a schedule
- Open the Schedules tab and create a new schedule.
- Give it a name, for example "Nightly restart".
- Set the time. The fields work like cron: minute, hour, day of month, month, day of week. A restart every day at 5:00, for example, is minute
0, hour5and*in the other fields. - Save the schedule.
Add the tasks
Add these tasks to the schedule, in this order:
- Send command:
say Server restart in 1 minute! - Send command:
save-all, with a 50 second delay. - Power action: restart, with a 10 second delay.
The delay counts from the previous task, so players get a warning one minute before the restart.
Tip: schedule the restart for the time when the fewest people are online, usually early in the morning.
Frequently asked questions
The restart happens at the wrong time.
Check the time zone shown next to the schedule and shift the hour if needed.
Can I do other things the same way?
Yes. A schedule can send any command at a set time, for example an announcement in the chat, or create a backup.
Pepe