Tutorial: how to auto restart your server

How to Auto restart your server

by Real-hamburger

Hey whazzup,
didn’t released long time anything so I wanted to make at least a little tutorial on how to restart your server. And I tried many of the tutorials that are already there, but it don’t want to work… (or I am stupid xD) So here is a tutorial for dummy’s

1st. step
cd to your Server folder where your server.cfg is located.

2st step
create a .bat file

3rd. step
paste this into the .bat file:

@echo off
:loop
start OpenServer.bat
timeout 21600
Taskkill /FI "WINDOWTITLE eq C:\Windows\system32\cmd.exe - OpenServer.bat"
goto loop

4rd. step
edit the code above:
at line 1 change OpenServer to the name what you gave your server start .bat file.
at line 2 change the value into the time where you want to have a restart. (in seconds, 21600 = 6 hours)
at line 3 change OpenServer again to the name of your start.bat of your server.

done. hope that help you guys! :smiley:
have a nice day and take a :hamburger: :mascot:

update
for those that don’t want that the server restarts after you press any button, insert after timeout ‘time’: /nobreak

1 Like