To schedule a server restart, open Schedules in the panel, create a schedule with the time in cron format (for example minute 0, hour 4, every day), then add tasks: a Send command to warn players, another to save, a Create backup, and a Send power action set to restart. Each task has a time offset in seconds, so the restart waits for the warning and the save. Turn on "Only When Server Is Online" and the schedule never starts a server you stopped on purpose.
Long sessions make many game servers slower as memory use grows. A daily restart at a quiet hour fixes that without anyone remembering to do it. This guide uses the Schedules tab of our panel, which is built on Pterodactyl.
How a schedule works
A schedule has two parts:
- When it runs, written as a cron expression: minute, hour, day of month, month and day of week.
- What it does: a list of tasks that run in order. Each task waits its time offset after the previous one before running.
The panel offers three kinds of task:
| Task | Payload | Use it for |
|---|---|---|
| Send command | A console command | Warnings, saving the world |
| Send power action | start, stop, restart or kill | The restart itself |
| Create backup | Files to ignore (optional) | A copy of the world before restarting |
The time offset can be up to 900 seconds (15 minutes) per task. For longer waits, chain two tasks. Each task also has a Continue on Failure switch: when on, the next tasks still run if this one fails.
Cron times you can copy
| Minute | Hour | Day of month | Month | Day of week | Runs |
|---|---|---|---|---|---|
0 | 4 | * | * | * | Every day at 4:00 |
0 | */6 | * | * | * | Every 6 hours |
30 | 5 | * | * | 1 | Mondays at 5:30 |
0 | 4,16 | * | * | * | Twice a day, 4:00 and 16:00 |
* means "every". Day of week 0 is Sunday and 1 is Monday. The panel has a Show Cheatsheet switch with more examples. After you save, check the next run time the panel shows: if it is off by some hours, the schedule uses the panel's time zone, so shift the hour to match yours.
How to schedule a server restart step by step
- Open your server in the panel and go to Schedules.
- Click to create a schedule. Name it, for example
Daily restart 4am. - Fill in the cron fields: Minute
55, Hour3, and*for the rest. The routine starts five minutes before the real restart. - Turn on Only When Server Is Online and Schedule Enabled, then save.
- Add task 1: Send command with your game's warning command, offset
0. - Add task 2: Send command with a final warning, offset
240(4 minutes later). - Add task 3: Send command with your game's save command, offset
50. - Add task 4: Create backup, offset
10. Turn on Continue on Failure so the restart still happens if the backup fails. - Add task 5: Send power action with
restart, offset60, so the backup has time to finish. - Use the run now option on the schedule page once, at a quiet moment, to test the whole chain.
Test each command by hand in Console first. If a command does nothing there, it will do nothing in a schedule either.
Ready-made routines for popular games
Minecraft (Java):
| # | Task | Payload | Offset |
|---|---|---|---|
| 1 | Send command | say Server restarts in 5 minutes | 0 |
| 2 | Send command | say Restarting in 1 minute, find a safe spot | 240 |
| 3 | Send command | save-all | 50 |
| 4 | Create backup | 10 | |
| 5 | Send power action | restart | 60 |
Restarting helps, but it is not the only fix for a slow server; see the Minecraft server lag fix guide.
Rust: use say "Server restarts in 5 minutes" for warnings and server.save to save, with the same offsets. Wipe days are a different job: see how to wipe a Rust server.
Palworld: memory use grows the longer it runs, which is why owners restart it daily. If your server's console does not take in-game commands, keep only Create backup followed by restart, with the offset between them. More on performance in our Palworld server lag fix.
Project Zomboid: servermsg "Restart in 5 minutes" to warn and save to save. The full backup routine is in how to back up a Project Zomboid server.
Other schedules worth having
- Backup every 6 hours without restart: one Create backup task on
0 */6 * * *. Useful when you cannot afford to lose half a day. - Weekly restart only: for light servers,
0 5 * * 1is enough. - Timed announcements: a Send command every hour with a rules reminder or your Discord link.
If a world ever breaks, a recent scheduled backup is what saves it. See how to restore a Palworld server backup as an example.
Common problems
| Problem | Fix |
|---|---|
| Schedule never runs | Schedule Enabled is off, or "Only When Server Is Online" is on and the server was off |
| Runs at the wrong hour | Check the next run time; the panel uses its own time zone |
| Warnings do not appear | The command is wrong for that game; test it in Console |
| Server restarted during the backup | Raise the offset before the restart task |
| Restart skipped after a failed backup | Turn on Continue on Failure on the backup task |
| Stopped server came back up | Turn on Only When Server Is Online |
Schedules on every TheGameHosting plan
On a home PC, a nightly restart means a script, a task scheduler and a computer that is always on. On TheGameHosting, Schedules, Backups and Console are part of the panel on every plan and for every game, and a plan can switch between more than 60 games with the Game Changer. Servers run on AMD 9950X and 7950X3D CPUs with DDR5 and NVMe in Dallas or Amsterdam, with DDoS protection and support 24/7 in English and Spanish. Plans start at 2 GB for $1.90 USD a month; see all plans and prices and use FULL2026 for 15% off for life.
FAQ
How do I schedule a server restart?
In Schedules, create a schedule with a cron time, then add a Send power action task with restart. Add warning, save and backup tasks before it with time offsets.
How often should I restart my game server?
Once a day at a quiet hour suits most busy servers. Light servers can restart weekly. Always save and back up first.
What is the time offset in a schedule?
The seconds a task waits after the previous task runs, up to 900. It lets players read a warning before the restart.
Will a scheduled restart start my server if I stopped it?
It can. Turn on "Only When Server Is Online" so the schedule only runs while the server is running.
Hosting for this game
Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.
All posts
TheGameHosting Team
