I made a batch file that will automatically restart my server if it crashes or if I type /shutdown or /restart in-game. Since I do not use the console the Code }{atch provides there is no other way to do this (that I am aware of).
This will also create a log for you when it detects the server going down.
The log will be created in the Logs file with the other logs that are generated.
It will be called Server_Restart_Log.txt and it just simply logs the date/time of the restart.
I felt it was worth sharing:
I tried to upload the .bat but the extension is restricted.Code:@echo off echo ^|-------------------------------------------------^| echo ^| Reign of Kings Server Restarter by SweetLouHD ^| echo ^|-------------------------------------------------^| echo ^| This batch file will keep your server online. ^| echo ^| If you type /shutdown or /restart in-game, ^| echo ^| the server will close, the automatically ^| echo ^| re-open. If you do not want this to happen, ^| echo ^| close this batch file, then run the command. ^| echo ^|-------------------------------------------------^| :STARTSERVER echo ^| Starting Server Now... echo ^| Date: %date% echo ^| Time: %time% @ROK -batchmode -nographics -silentcrash -nolog echo ^| Warning! Server has crashed. echo %DATE:~-4%-%DATE:~-7,2%-%DATE:~-10,2% ^|%TIME:~0,2%:%TIME:~3,2% >> Logs/Server_Restart_Log.txt echo ^| Restarting it now. echo ^|------------------------------------------------^>GOTO STARTSERVER
Just copy paste the above code into your favorite text editor and save as serverRestarter.bat
This will replace your normal Server Start batch file.
[DOUBLEPOST=1435832102,1435821231][/DOUBLEPOST]for the minimalists
Code:@echo off :STARTSERVER echo Starting Server Now... @ROK -batchmode -nographics -silentcrash -nolog echo Warning! Server has crashed. echo %DATE:~-4%-%DATE:~-7,2%-%DATE:~-10,2% ^|%TIME:~0,2%:%TIME:~3,2% >> Logs/Server_Restart_Log.txt echo Restarting it now. GOTO STARTSERVER
Automatic restart batch file
Discussion in 'Reign of Kings Discussion' started by SweetLouHD, Jul 2, 2015.