# How to Set Up Automatic Restarts on Your Minecraft Server (/docs/minecraft/server-restart-schedule)



Regular restarts help clear memory leaks, refresh loaded chunks, and keep your server running at peak performance. Most servers benefit from restarting every 6-12 hours.

Setting Up Scheduled Restarts [#setting-up-scheduled-restarts]

<div className="fd-steps">
  <div className="fd-step">
    Open Schedules [#1-open-schedules]

    Access the [XGamingServer panel](https://panel.xgamingserver.com) and go to `Schedules` in the sidebar.
  </div>

  <div className="fd-step">
    Create a new schedule [#2-create-a-new-schedule]

    Click **Create Schedule**. Set a name like "Auto Restart" and set your cron timing (e.g., every 6 hours: `0 */6 * * *`).
  </div>

  <div className="fd-step">
    Add a warning message [#3-add-a-warning-message]

    Add a task: **Send Command** with value:

    ```
    say Server restarting in 60 seconds. Please save your progress!
    ```
  </div>

  <div className="fd-step">
    Add a delay [#4-add-a-delay]

    Add a 60-second delay to give players time to prepare.
  </div>

  <div className="fd-step">
    Add the restart action [#5-add-the-restart-action]

    Add a task: **Send Power Action** → **Restart**.

    > 💡 **Tip:** For busy servers, consider restarting during low-traffic hours (e.g., 4 AM and 4 PM) rather than every X hours.
  </div>
</div>

Recommended Restart Frequency [#recommended-restart-frequency]

| Server Type             | Restart Frequency |
| ----------------------- | ----------------- |
| Vanilla / Paper (small) | Every 12-24 hours |
| Paper + plugins         | Every 6-12 hours  |
| Modded (Forge/Fabric)   | Every 6-8 hours   |
| Heavy modpacks          | Every 4-6 hours   |

> 📝 **Note:** If your server maintains a stable 20 TPS without restarts, you don't necessarily need scheduled restarts. They're most useful for modded servers and servers with many plugins.

See also: [Performance Guide](/docs/minecraft/optimize-server) | [How Much RAM](/docs/minecraft/how-much-ram)

If you need help, join our [Discord](https://discord.xgamingserver.com/).
