CrashProofing?
Depot
The ModFather Join Date: 2002-11-09 Member: 7956Members
The ModFather Join Date: 2002-11-09 Member: 7956Members
Comments
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off
title NS2 Server Monitor
cd "c:\servers\pub1\"
:NS2
echo (%time%) Server started.
start /wait server.exe -file c:\servers\pub1\server.xml -adminpath pub1/
echo (%time%) WARNING: NS2 closed or crashed, restarting.
goto NS2<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->@echo off
title NS2 Server Monitor
cd "$ServerDirectory"
:NS2
echo (%time%) Server started.
start /wait server.exe $CommandLineArg1 $CommandLineArg2
echo (%time%) WARNING: NS2 closed or crashed, restarting.
goto NS2<!--c2--></div><!--ec2-->
Then simply save the file with the extension .bat and call it something like NS2server.bat.
Place this file on your desktop for easy access as this will be how you start the server from now on.