Server tips

How to Schedule a Server Restart Automatically

Schedules in the panel can warn players, save the world, take a backup and restart the server while you sleep. Here is how to build that routine step by step.

TheGameHosting Team 6 min read
Restart Your Server Automatically
Background: Satisfactory © Coffee Stain Studios

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:

  1. When it runs, written as a cron expression: minute, hour, day of month, month and day of week.
  2. 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:

TaskPayloadUse it for
Send commandA console commandWarnings, saving the world
Send power actionstart, stop, restart or killThe restart itself
Create backupFiles 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

MinuteHourDay of monthMonthDay of weekRuns
04***Every day at 4:00
0*/6***Every 6 hours
305**1Mondays at 5:30
04,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

  1. Open your server in the panel and go to Schedules.
  2. Click to create a schedule. Name it, for example Daily restart 4am.
  3. Fill in the cron fields: Minute 55, Hour 3, and * for the rest. The routine starts five minutes before the real restart.
  4. Turn on Only When Server Is Online and Schedule Enabled, then save.
  5. Add task 1: Send command with your game's warning command, offset 0.
  6. Add task 2: Send command with a final warning, offset 240 (4 minutes later).
  7. Add task 3: Send command with your game's save command, offset 50.
  8. Add task 4: Create backup, offset 10. Turn on Continue on Failure so the restart still happens if the backup fails.
  9. Add task 5: Send power action with restart, offset 60, so the backup has time to finish.
  10. 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):

#TaskPayloadOffset
1Send commandsay Server restarts in 5 minutes0
2Send commandsay Restarting in 1 minute, find a safe spot240
3Send commandsave-all50
4Create backup10
5Send power actionrestart60

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

  1. Backup every 6 hours without restart: one Create backup task on 0 */6 * * *. Useful when you cannot afford to lose half a day.
  2. Weekly restart only: for light servers, 0 5 * * 1 is enough.
  3. 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

ProblemFix
Schedule never runsSchedule Enabled is off, or "Only When Server Is Online" is on and the server was off
Runs at the wrong hourCheck the next run time; the panel uses its own time zone
Warnings do not appearThe command is wrong for that game; test it in Console
Server restarted during the backupRaise the offset before the restart task
Restart skipped after a failed backupTurn on Continue on Failure on the backup task
Stopped server came back upTurn 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