Help centre

Performance

How to schedule automatic restarts and commands on a Minecraft server

A Minecraft server that runs for days on end slowly collects things it no longer needs in memory. Many owners restart once a day at a quiet hour, and let the server do it by itself.

There are two ways: the Automatic restart switch in Settings for a plain daily restart, and the Schedules tab for anything more, such as warnings in chat, several restarts a day, or commands at a fixed time.

The quick way: Automatic restart in Settings

  1. Open Settings and find Automatic saves and restarts.
  2. Switch Automatic restart on.
  3. Choose Daily or Mondays, and the hour.
  4. Save.

At that time the server warns players in chat, saves the world and comes back within a minute or two. On a modded server it also clears memory that mods leak over a long uptime. For most servers this is all you need.

The same card sets how often the world is saved: Use Minecraft default, Every 15 minutes, Every 30 minutes or Every hour. More frequent saves mean less lost work after a crash.

Pick a quiet hour

The Players tab has a card called When your players are online. It shows the average number of players per hour over the last 30 days, in your own time zone, and names the quietest moment: "A good moment for a restart." A new server needs a few days before the picture fills in.

Make a schedule in the Schedules tab

A schedule runs something on the server at a fixed time. First you make the schedule, then you add what it should do.

  1. Open the Schedules tab and go to New schedule.
  2. Give it a Name, such as Nightly restart.
  3. Under How often, choose Every day, Every week, Every 6 hours or Every hour, and for a daily or weekly schedule the hour and the day.
  4. Leave Only run when the server is online ticked for a restart, so a server you stopped on purpose stays off.
  5. Click Create.

Under each schedule you see when it ran last and when it runs next. Check next after you make one, so you know it will run at the time you meant.

A schedule without tasks does nothing. The panel says so under the schedule until you add one.

Add a restart with warnings in chat

Each task has a Do what and a Wait first (s): the number of seconds after the previous step. That lets you build a countdown. Add these tasks to the schedule, in this order:

Do whatCommand or actionWait first (s)
Console commandsay Restarting in 5 minutes0
Console commandsay Restarting in 1 minute, find a safe spot240
Console commandsave-all50
Power actionRestart10

Click Add a task under the schedule, pick the kind, fill it in and click Add task. Console commands are typed without a slash, just like in the console.

Players see the messages in chat, the world is saved, and the server restarts five minutes after the first warning.

Other useful schedules

  • A message every hour: say Vote for the server and join our Discord with Every hour. Keep it short and not too often, or players tune it out.
  • A restart every 6 hours on a busy modded server that grows heavy during the day.
  • Clear dropped items with kill @e[type=item] a minute after a warning in chat, if items lying around cause lag. It also removes the items of a player who just died, so warn first. See reduce lag for the causes worth fixing.
  • Start the server in the morning and stop it at night with two schedules and the Start and Stop power actions, for a server that only a class or a club uses. Untick Only run when the server is online on the start schedule, because the server is off when it runs.

Pause, test and remove a schedule

  • Run now runs the tasks at once. Handy to test your countdown, but warn your players first.
  • Pause stops a schedule without losing it, and Activate turns it back on. A paused schedule is marked Paused.
  • Delete removes the schedule and its tasks.
  • Advanced (raw cron) is for people who know cron and want times the simple choices do not cover, such as twice a day.

Questions

How often should a Minecraft server restart?

Once a day is common and enough for most servers. A heavy modded server can do well with a restart every 6 or 12 hours. If a server needs a restart every hour to stay smooth, something else is wrong; see reduce lag.

Do players lose anything in a scheduled restart?

No, as long as the world is saved first. The Automatic restart in Settings saves by itself; in your own schedule, put save-all before the restart.

Why did my schedule not run?

Check that it has at least one task, that it is not paused, and whether Only run when the server is online is ticked while the server was off. The next run time under the schedule shows when it will try again.

Should I use Automatic restart or a schedule?

Automatic restart in Settings for one plain restart a day or a week, with the warning and the save built in. A schedule when you want your own messages, more restarts a day, or commands at set times.

Checked against the Settings, Schedules and Players tabs of our control panel, September 2026. Written by the Cheapest Minecraft Hosting team, updated .