• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Server RO windows Server Auto restart on crash.

I have read several Admins having problems with crashes and having to manually restart their servers.
With this in mind I thought I would release our windows server auto restart code which my Clan The Wild Bunch apply to all our servers via a .bat file.
If you run a windows based server then the simplest way to set this up is to make a shortcut of your RO_server.bat file and place it on the desktop.
Edit the shortcut and place the following code inside.

YOU WILL NEED TO EDIT THE CODE TO SUIT THE PATH OF YOUR OWN INSTALLATION AS I HAVE SHOWN IN RED and of course replace the command line (in green) with your own.


@echo off
title RO Public server
echo Look at the top of the window.
echo.
cd c:\ROOst
set GameText===== RO Public server ====
set GameCmd=C:\ROOst\system\ucc server RO-Basovka.rom?deathmessagemode=3?FriendlyFireScale=1?FFPunishment=1?PreStartTime=45?RoundLimit=3?WinLimit=2?TimeLimit=0?FFKillLimit=5?FFDamageLimit=300?VACSecure=true?game=ROEngine.ROTeamGame?MinPlayers=0? -log=ServerLog.log
echo %GameText%
echo.
echo This is the %GameText% Auto Runner
echo To Restart the server close the corresponding Game
echo To Shut down the server close this window.
echo.
set LogFile="%homepath%\Desktop\Logs\%GameText%.log"
echo Output is logged to %LogFile%
echo.
echo This is the command line: >>%LogFile%
echo %GameCmd% >>%LogFile%
:start
echo ReStarting %GameText%
date/t
time/t
echo ReStarting %GameText% >>%LogFile%
date/t >>%LogFile%
time/t >>%LogFile%
call %GameCmd%
goto start


I hope this will help out those having problems with the odd random crash?
 
Hi BC,

Couple of questions m8, thanks for this I have been using your bat file for a while now but have a problem with the log file path, I get "System cannot find the path specified" tried manually creating the files for the path, but no joy.

Also is it like the old CoD bat, starts another game window because mine doesn't if it should.

@echo off
title RO Public server
echo Look at the top of the window.
echo.
e:
cd e:\ROOst
set GameText===== RO Public server ====
set GameCmd=E:\ROOst\system\ucc server RO-Arad.rom?FriendlyFireScale=1?FFPunishment=1?PreStartTime=30?RoundLimit=3?WinLimit=2?TimeLimit=0?FFKillLimit=6?FFDamageLimit=800?VACSecure=true?game=ROEngine.ROTeamGame?-log=ServerLog.log
echo %GameText%
echo.
echo This is the %GameText% Auto Runner
echo To Restart the server close the corresponding Game
echo To Shut down the server close this window.
echo.
set LogFile="%homepath%\Desktop\Logs\%GameText%.log"
echo Output is logged to %LogFile%
echo.
echo This is the command line: >>%LogFile%
echo %GameCmd% >>%LogFile%
:start
echo ReStarting %GameText%
date/t
time/t
echo ReStarting %GameText% >>%LogFile%
date/t >>%LogFile%
time/t >>%LogFile%
call %GameCmd%
goto start
 
Upvote 0
Create a folder on your desktop called Logs....that should be it.
This will create log files inside telling you when the server was last rebooted.

Punchy it won't start a second window for RO as RO is already a .bat file.

You can use this code to auto start any game server as long as you create a .bat file and point the code to the server start up file.
When you point it to a .exe like the CoD2 mp the bat file will start up first followed by the games consol window.
 
Upvote 0
Just a not to everyone who may use this as we have discovered with Punchy's installation to use this code YOU MUST ENSURE THAT RO SERVER FILES ARE ON THE SAME DRIVE AS YOUR .BAT FILE WITH THE AUTO START CODE INSIDE IF YOU WISH TO USE THE LOGGING THATS ALSO CODE INCLUDED.

In Punchy's instance the Logs files will not be recorded because he has the RO server files installed on a different drive to his .bat start up file preventing the lof files being created.
This is not a problem if you are not bothered about the logging side which simply records when the server was last rebooted.
Simply remove this side of the code.
 
Upvote 0
Hi sorry to be bumping an old thread but just curious why I am getting error "The system cannot find the path specified." over and over again?




Look at the top of the window.
==== Server ====
This is the ==== Server ==== Auto Runner
To Restart the server close the corresponding Game
To Shut down the server close this window.
Output is logged to "\Users\Admin\Desktop\Logs\==== Server
====.log"
The system cannot find the path specified.
The system cannot find the path specified.
ReStarting ==== Server ====
Mon 03/10/2014
11:42 PM
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
STEAMAUTH : SteamAPI_Init failed
 
Upvote 0
D:\Server\kfs1\System\KF_Server_Launcher.bat


is where I go to open the bat file that opens the game so if I understand this right the cd should be


"cd D:Server\kfs1"


and the gamecmd would be


"set GameCmd=D:\Server\kfs1\System\ucc server KF-westlondon.rom?" etc.

Is your .bat startup file actually within the main game folder?
If not put it there and create a shortcut for the server desktop.
You can start and edit the .bat file from the shortcut if needed.
 
Upvote 0
Just to make sure we are on the same page. All I am doing is editing the .bat that was installed when I installed the server? Or do i delete that one and create some other .bat file?

Also yes I changed the directory that the server is installed. which would be D:\KillingFloorServers\kfs1\System\KF_Server_Launcher.bat

kfsq001.png
 
Last edited:
Upvote 0