The dependable way to auto-restart a Minecraft server is to perform a clean stop, wait for the server process to exit, and then launch it again on a schedule. A hosting control panel can usually do this without code. A self-managed Linux server needs a restart script called by cron. Java and Bedrock use different launch commands, but both should warn players, save the world with the normal stop command, and only start again after the old process has ended.
Prefer not to run the server on your own PC? Godlike.Host offers hosted Minecraft Java servers with free DDoS protection and up to three free backups a day.
For a daily restart at 4:00 a.m., create a schedule with minute 0, hour 4, and wildcards in the remaining cron fields, or add 0 4 * * * to the Linux user’s crontab. Test the restart manually before relying on the schedule.
As an Amazon Associate I earn from qualifying purchases.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Choose the right automation method
Your server’s management model determines the simplest solution. A panel schedule is the least technical option; a script and cron provide more control on a virtual machine or dedicated Linux host.
| Method | Setup | Control | Best fit |
|---|---|---|---|
| Hosting-panel schedule | Choose a time in the Schedules or Tasks area and select a power action | Usually limited to the panel’s actions and delay options | Servers managed entirely through a control panel |
| Linux script plus cron | Write a script, make it executable, then add a crontab entry | Can announce, wait for a clean shutdown, log output, and select Java or Bedrock launch arguments | Self-managed servers with SSH or console access |
Do not run both methods against the same instance. Two schedulers can issue overlapping stops or launch two server processes in the same world directory.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Prepare the server before scheduling a restart
- Identify the exact server directory, launch command, Java memory settings, and screen or service name.
- Confirm that the account running the scheduler owns the server files and can write to the world and log directories.
- Keep the server’s normal console available so you can observe a manual stop and start.
- Tell players when the restart occurs. A clean restart still disconnects everyone, so choose a quiet period and provide warning time.
- Make one manual restart from the same account that will run the schedule. A command that works in an interactive shell can fail under cron because cron has a smaller environment and a different working directory.
Schedule a restart in a hosting panel
Panel names differ, but the workflow is usually under Schedules, Tasks, or a similarly named automation tab. The safest arrangement is a warning task followed by a separate restart action.
Create the warning
- Open the server’s Schedules or Tasks page and choose Create schedule or its equivalent.
- Set the schedule to the desired time. For 4:00 a.m. every day, use minute
0, hour4, day of month*, month*, and day of week*when the panel exposes cron-style fields. - Add a console command or command task that sends a message such as
say Server restarting in 60 seconds. Please log out safely.Do not include the leading slash when the panel’s console field expects a server command; use the panel’s documented format. - Set the warning task to run before the power action. A 60-second warning is a practical starting point; use a longer delay if players need time to finish activities.
Add the restart action
- Add a second task at the same daily time, or append an action to the existing schedule if the panel supports ordered tasks.
- Choose the power action labeled Restart the server. Do not choose a hard kill or forced stop unless the server is already unresponsive; a normal restart should let the server save and close cleanly.
- If the panel supports task delays, place the restart after the warning and set the delay to match the warning period.
- Save the schedule and check its next-run time. Verify the panel’s timezone rather than assuming it uses your local clock.
Test the panel schedule
Use a manual Run now option if available, or temporarily schedule a test a few minutes ahead. Watch the console for the warning, the stop sequence, and a new startup. Confirm that the world loads and that only one server process is running. Remove any temporary test schedule afterward.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBuild a Linux restart script with screen and cron
The example below follows the common screen-based layout: the Minecraft process runs in a detached screen session named mc, so it continues after an SSH connection closes. Change every path, session name, memory value, and jar name to match your installation.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Java Edition script
#!/bin/bash
set -euo pipefail
SESSION='mc'
DIR='/home/mc/server'
JAVA_BIN='/usr/bin/java'
JAR='server.jar'
if ! screen -list | grep -q "[.]${SESSION}[[:space:]]"; then
echo "Minecraft screen session '${SESSION}' is not running" >&2
exit 1
fi
screen -S "$SESSION" -X stuff "say Restarting in 60 seconds$(printf 'r')"
sleep 60
screen -S "$SESSION" -X stuff "stop$(printf 'r')"
for _ in $(seq 1 120); do
if ! screen -list | grep -q "[.]${SESSION}[[:space:]]"; then
break
fi
sleep 1
done
if screen -list | grep -q "[.]${SESSION}[[:space:]]"; then
echo 'Minecraft did not exit within 120 seconds' >&2
exit 1
fi
cd "$DIR"
screen -dmS "$SESSION" "$JAVA_BIN" -Xmx4G -Xms4G -jar "$JAR" nogui
The stop command is sent through the server console, not typed as a Linux shell command. The loop waits for the screen session to disappear instead of assuming that a fixed 20-second delay is enough. Shutdown time varies with world size, disk speed, plugins, and mods; if the process remains after the timeout, the script exits rather than starting a second copy against the same world.
Install and test the script
- Save it as
/home/mc/restart_mc.sh, or another path outside the world directory. - Set ownership and executable permission for the account that owns the server:
chmod +x /home/mc/restart_mc.sh. - Run it interactively:
/home/mc/restart_mc.sh. Remain connected long enough to see the warning, stop, and new startup. - Attach to the console when needed with
screen -r mc. Detach without stopping the server usingCtrl-A, thenD. - Check the Minecraft log after the restart and confirm that the world, plugins, and players can reconnect.
If the script reports that the screen session is missing, start the server using its normal command first or change SESSION to the actual session name. If your installation uses systemd rather than screen, use the service’s stop and start operations in a dedicated unit or timer instead of mixing service control with a screen script.
Add the daily cron entry
Edit the crontab for the same Linux account that owns the server:
Recommended Free Tools
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
crontab -e
Add this line for a daily 4:00 a.m. run:
0 4 * * * /home/mc/restart_mc.sh >> /home/mc/restart_mc.log 2>&1
The five fields mean minute, hour, day of month, month, and day of week. Use full paths because cron may not load your interactive shell’s PATH. The displayed time follows the host or user’s configured timezone; check it before selecting a maintenance window. The log redirection preserves script errors and makes the first scheduled run easier to diagnose.
Java Edition and Bedrock Edition differences
Java Edition
Java servers are commonly launched with a command such as java -Xmx4G -Xms4G -jar server.jar nogui. Replace the memory values and jar filename with the values used by your server. The standard /stop server command saves changes, shuts the server down, and disconnects players. The Minecraft Wiki lists that command as requiring permission level 4 when issued in-game or through a permission system; a console command normally bypasses in-game chat permissions.
Bedrock Dedicated Server
Bedrock has a different executable. A commonly documented Linux launch form is:
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
cd /home/mc/bedrock
LD_LIBRARY_PATH=. ./bedrock_server
To keep it running after SSH disconnects, launch that command inside the same detached screen session used by the restart script. The exact executable location and startup wrapper vary, so treat the command above as an example rather than a universal installer command. Some Ubuntu setups use a start.sh wrapper or a systemctl service; in those cases, call the existing wrapper or service consistently for both manual and scheduled starts.
Free tools Windows power users keep installed
One-click scans. No signup required.
Microsoft’s Bedrock command reference describes /stop as a dedicated-server command that requires the Owner permission level and enabled cheats. A third-party Bedrock administration guide also says allow-cheats=true must be present in server.properties, followed by a server restart, before server commands work. Enabling cheats changes the server’s command permissions, so make that setting deliberately and restrict console access.
For Bedrock, adapt the Java script’s final launch section to the executable, for example:
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
cd '/home/mc/bedrock'
screen -dmS "$SESSION" bash -lc 'cd /home/mc/bedrock && export LD_LIBRARY_PATH=. && exec ./bedrock_server'
Keep the same sequence: announce, send stop, wait until the old process exits, then launch the executable. Do not start Bedrock while an earlier process still has the world files open.
How often should a Minecraft server restart?
There is no official restart interval or published statistic showing that one schedule improves every server. Hosting-provider guidance commonly suggests restarts every 6 to 12 hours for busy or heavily modded servers, while a small vanilla server may run longer between maintenance windows. Treat those intervals as operational advice, not a measured standard.
| Server situation | Starting schedule to evaluate | What to watch |
|---|---|---|
| Busy or heavily modded | Every 6–12 hours | Memory growth, plugin behavior, tick lag, and whether players can use the chosen maintenance windows |
| Small vanilla server | Longer than 12 hours, or once daily | Shutdown duration, log errors, and whether a restart solves an observed problem |
| Low-traffic private server | One quiet daily restart or an on-demand restart | Whether automation adds disruption without a practical benefit |
Schedule maintenance when the fewest players are online. A restart is not a substitute for investigating crashes, disk errors, runaway plugins, or an undersized host; it only creates a controlled stop-and-start cycle.
Troubleshoot failed automatic restarts
The schedule never runs
- Confirm the task is enabled and has a future next-run time.
- Check the panel or host timezone, including daylight-saving changes.
- For cron, verify the entry with
crontab -l, use the absolute script path, and inspect the redirected log. - Make sure the cron account has execute permission on the script and traverse permission on every parent directory.
The server stops but does not start
- Run the script manually and read its error output.
- Use absolute paths for Java, the Bedrock executable, and the server directory.
- Confirm that the jar or executable filename matches the installed version.
- Check whether the shutdown timeout was reached. A timeout should stop the script, not launch a second process; investigate the server log before trying again.
The stop command does nothing
- Verify that the script targets the correct screen session and that the Minecraft process is actually attached to it.
- Check the command syntax expected by the edition and panel. Java’s normal console command is
stop; Bedrock may require owner permission and enabled cheats for command execution. - Do not send a Linux
killas the first response. A forced termination can interrupt world saving.
Players receive no warning
Ensure the announcement task runs before the power action and that the message is sent to the Minecraft console, not the host shell. In a script, confirm that the screen session name is correct and that the carriage return in $(printf 'r') is retained; without an Enter keystroke, the text remains in the console input.
Two servers start or the wrong world loads
Look for duplicate panel schedules, duplicate cron entries, and manually launched copies. Check the script’s DIR value and use a distinct screen session for each independent server. A single world directory should have one active server process.
Quick Recap
Safe operating checklist
- Announce the restart before issuing
stop. - Use the normal stop command so the world can save and players are disconnected cleanly.
- Wait for the old process to exit; do not rely on a short fixed delay when shutdown time is unknown.
- Launch with the same working directory, executable, memory settings, and edition-specific arguments used during a successful manual start.
- Use full paths and capture cron output.
- Test the complete sequence manually, then perform one scheduled test before making the schedule permanent.
- Review logs after the first automatic run and after any Minecraft, plugin, mod, Java, or Bedrock executable update.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




