EagerBeaver Posted November 5, 2016 Report Share Posted November 5, 2016 Hey guys :) So today i decided to set-up BEC and the extended controls to my personal server.. It seems BEC is working great because i am getting my restart notifications and server messages but when my server turns of to restart it dont start back up :( Here are the contents of my used batch files and other things if someone could help why its not starting my server back up that would be epic ........................ :D My Start.bat @ echo off pushd %~dp0 cd /d %CD% start /b "taki overpoch server" /min "DayZ_Overpoch_instance_1_Takistan.bat" timeout 50000 - i changed this from 15 in case this was the problem :) cd "C:\Users\freak\Desktop\taki overpoch server\instance_1_Overpoch\BattlEye\Bec" start "UEP BattlEye Extended Control" /min "BEC.exe" -f "Config.cfg" taskkill /f /im cmd.exe cls @exit My Restart.bat @ echo off pushd %~dp0 cd /d %CD% timeout 7 taskkill /f /im bec.exe timeout 50000 - i changed this from 15 in case this was the problem :) start /b "taki overpoch server" /min "DayZ_Overpoch_instance_1_Takistan.bat" timeout 50000 - i changed this from 15 in case this was the problem :) cd "C:\Users\freak\Desktop\taki overpoch server\instance_1_Overpoch\BattlEye\Bec" start "UEP BattlEye Extended Control" /min "BEC.exe" -f "Config.cfg" taskkill /f /im cmd.exe cls @exit And my simple little BEC config.cfg [Bec] IP = 139.218.77.122 Port = 2310 BePath = C:\Users\freak\Desktop\taki overpoch server\instance_1_Overpoch\BattlEye\ Admins = Admins.xml Commands = Commands.xml [Misc] Ban = 3 ConsoleHeight = 30 ConsoleWidth = 60 Scheduler = Scheduler.xml KickLobbyIdlers = 400 ChatChannelFiles = True Timeout = 60 [Reporter] #User = alfred #Password = 123456 And my kind of big BEC scheduler.xml <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <Scheduler> <job id='0'> <day>1,2,3,4,5,6,7</day> <start>000600</start> <runtime>000600</runtime> <loop>-1</loop> <cmd>say -1 Overpoch Takistan</cmd> </job> <job id='1'> <day>1,2,3,4,5,6,7</day> <start>000600</start> <runtime>000600</runtime> <loop>-1</loop> <cmd>say -1 Server restarts at 3-6-9-12 am-pm</cmd> </job> <!-- 06:00 AM restart --> <job id='2'> <day>1,2,3,4,5,6,7</day> <start>05:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='3'> <day>1,2,3,4,5,6,7</day> <start>05:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='4'> <day>1,2,3,4,5,6,7</day> <start>05:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='5'> <day>1,2,3,4,5,6,7</day> <start>06:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='6'> <day>1,2,3,4,5,6,7</day> <start>06:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 06:00 AM restart --> <!-- 09:00 AM restart --> <job id='7'> <day>1,2,3,4,5,6,7</day> <start>08:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='8'> <day>1,2,3,4,5,6,7</day> <start>08:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='9'> <day>1,2,3,4,5,6,7</day> <start>08:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='10'> <day>1,2,3,4,5,6,7</day> <start>09:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='11'> <day>1,2,3,4,5,6,7</day> <start>09:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 09:00 AM restart --> <!-- 12:00 PM restart --> <job id='12'> <day>1,2,3,4,5,6,7</day> <start>11:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='13'> <day>1,2,3,4,5,6,7</day> <start>11:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='14'> <day>1,2,3,4,5,6,7</day> <start>11:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='15'> <day>1,2,3,4,5,6,7</day> <start>12:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='16'> <day>1,2,3,4,5,6,7</day> <start>12:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 12:00 PM restart --> <!-- 03:00 PM restart --> <job id='17'> <day>1,2,3,4,5,6,7</day> <start>14:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='18'> <day>1,2,3,4,5,6,7</day> <start>14:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='19'> <day>1,2,3,4,5,6,7</day> <start>14:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='20'> <day>1,2,3,4,5,6,7</day> <start>15:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='21'> <day>1,2,3,4,5,6,7</day> <start>15:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 03:00 PM restart --> <!-- 06:00 PM restart --> <job id='22'> <day>1,2,3,4,5,6,7</day> <start>17:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='23'> <day>1,2,3,4,5,6,7</day> <start>17:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='24'> <day>1,2,3,4,5,6,7</day> <start>17:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='25'> <day>1,2,3,4,5,6,7</day> <start>18:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='26'> <day>1,2,3,4,5,6,7</day> <start>18:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 06:00 PM restart --> <!-- 09:00 PM restart --> <job id='27'> <day>1,2,3,4,5,6,7</day> <start>20:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='28'> <day>1,2,3,4,5,6,7</day> <start>20:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='29'> <day>1,2,3,4,5,6,7</day> <start>20:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='30'> <day>1,2,3,4,5,6,7</day> <start>21:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='31'> <day>1,2,3,4,5,6,7</day> <start>21:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 09:00 PM restart --> <!-- 12:00 AM restart --> <job id='32'> <day>1,2,3,4,5,6,7</day> <start>23:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='33'> <day>1,2,3,4,5,6,7</day> <start>23:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='34'> <day>1,2,3,4,5,6,7</day> <start>23:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='35'> <day>1,2,3,4,5,6,7</day> <start>00:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='36'> <day>1,2,3,4,5,6,7</day> <start>00:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 12:00 AM restart --> <!-- 03:00 AM restart --> <job id='37'> <day>1,2,3,4,5,6,7</day> <start>02:45:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> </job> <job id='38'> <day>1,2,3,4,5,6,7</day> <start>02:55:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 minute, log out now to prevent item loss!</cmd> </job> <job id='39'> <day>1,2,3,4,5,6,7</day> <start>02:59:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> </job> <job id='40'> <day>1,2,3,4,5,6,7</day> <start>03:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd> </job> <job id='41'> <day>1,2,3,4,5,6,7</day> <start>03:00:10</start> <runtime>000000</runtime> <loop>0</loop> <cmd>C:\Users\freak\Desktop\taki overpoch server\restart.bat</cmd> </job> <!-- End 03:00 AM restart --> </Scheduler> Sorry for such a big post :-\ Did not know how to shorten :) Link to comment Share on other sites More sharing options...
juandayz Posted November 5, 2016 Report Share Posted November 5, 2016 @EagerBeaver ///DOING .BAT FILES/// STEP 1: Do a .bat file called "Monitor" and paste this. (change the paths for your server routes) @echo off cls echo Watching arma2oaserver For Crashes/Restarts... echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter. title Raklatif's Arma2OA Monitor set becpath="C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec" cd /d %becpath% :arma2oaserver start "BattleEye Extended Control" "BEC Control Epoch.bat" echo (%time%) arma2oaserver started. start /wait "arma2" /min /high "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -cpuCount=2 -maxmem=2047 -exThreads=1 -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. // TIMEOUT /T 180 /NOBREAK goto arma2oaserver ******Now paste this .bat file in your server root. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Step 2: Do a .bat file called "BEC Control Epoch" and paste this into: (change the paths for your server) :: KILL BATTLEYE taskkill /im Bec.exe timeout 1 TIMEOUT /T 60 /NOBREAK cd\ cd "C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec" Bec.exe -f Config.cfg --dsc ***Now paste this .bat file in ...\instance_11_Chernarus\BattlEye\Bec --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 3: Do a .bat file called "Premod_restart" and paste this into: (change the paths for your server) @echo off echo Stopping server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start /wait Premod_stop.bat echo Backing up database start /wait Premod_backup.bat echo Starting BEC cd C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec start Bec.exe -f Config.cfg echo Starting server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start "arma2" /min "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" ping 127.0.0.1 -n 5 >NUL ***Now paste this .bat file in your server root ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 4: Do a .bat file called "Premod_stop" and paste this into: (change the paths for your server) @echo off taskkill /F /IM arma2oaserver.exe taskkill /F /IM Bec.exe exit ***Now paste this .bat file in your server root ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /// EDITING YOUR BEC`s Files /// STEP 5: go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config and open whit Note++ your Shedule.xml ***Now u needs add this at every last shedule id job: <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> (change for ur server paths) This is my example: <Scheduler> <!-- 12:00 AM restart --> <job id="0"> <time>23:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="1"> <time>23:55:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 5 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="2"> <time>23:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="3"> <time>00:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <job id="4"> <time>00:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 12:00 AM restart --> ***Do the same for each job id group. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 6: Now go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config\ and open whit note++ your Config.cfg Ip = 127.0.0.1 Port = 2302 BePath = C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye (Here put your Bec Path) Admins = Admins.xml Commands = Commands.xml Any doubt here you have my files...http://www.mediafire.com/download/6afp6inam56tfq2/autorestart.rar Drop battleye folder into serverRoot\instance_11_Chernarus\ The others 3 .bat files must be in your serverRoot- then change paths for all this files as i say above in "step by step": Monitor.bat // Premod_restart.bat // BEC Control Epoch.bat // Scheduler.xml // Config.cfg Once you do all it... just start your server with monitor.bat EagerBeaver 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 5, 2016 Author Report Share Posted November 5, 2016 I will try your way today :) juandayz juandayz juandayz 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 6, 2016 Author Report Share Posted November 6, 2016 6 hours ago, juandayz said: @EagerBeaver ///DOING .BAT FILES/// STEP 1: Do a .bat file called "Monitor" and paste this. (change the paths for your server routes) @echo off cls echo Watching arma2oaserver For Crashes/Restarts... echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter. title Raklatif's Arma2OA Monitor set becpath="C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec" cd /d %becpath% :arma2oaserver start "BattleEye Extended Control" "BEC Control Epoch.bat" echo (%time%) arma2oaserver started. start /wait "arma2" /min /high "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -cpuCount=2 -maxmem=2047 -exThreads=1 -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. // TIMEOUT /T 180 /NOBREAK goto arma2oaserver ******Now paste this .bat file in your server root. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Step 2: Do a .bat file called "BEC Control Epoch" and paste this into: (change the paths for your server) :: KILL BATTLEYE taskkill /im Bec.exe timeout 1 TIMEOUT /T 60 /NOBREAK cd\ cd "C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec" Bec.exe -f Config.cfg --dsc ***Now paste this .bat file in ...\instance_11_Chernarus\BattlEye\Bec --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 3: Do a .bat file called "Premod_restart" and paste this into: (change the paths for your server) @echo off echo Stopping server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start /wait Premod_stop.bat echo Backing up database start /wait Premod_backup.bat echo Starting BEC cd C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec start Bec.exe -f Config.cfg echo Starting server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start "arma2" /min "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" ping 127.0.0.1 -n 5 >NUL ***Now paste this .bat file in your server root ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 4: Do a .bat file called "Premod_stop" and paste this into: (change the paths for your server) @echo off taskkill /F /IM arma2oaserver.exe taskkill /F /IM Bec.exe exit ***Now paste this .bat file in your server root ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /// EDITING YOUR BEC`s Files /// STEP 5: go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config and open whit Note++ your Shedule.xml ***Now u needs add this at every last shedule id job: <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> (change for ur server paths) This is my example: <Scheduler> <!-- 12:00 AM restart --> <job id="0"> <time>23:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="1"> <time>23:55:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 5 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="2"> <time>23:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="3"> <time>00:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <job id="4"> <time>00:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 12:00 AM restart --> ***Do the same for each job id group. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 6: Now go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config\ and open whit note++ your Config.cfg Ip = 127.0.0.1 Port = 2302 BePath = C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye (Here put your Bec Path) Admins = Admins.xml Commands = Commands.xml Any doubt here you have my files...http://www.mediafire.com/download/6afp6inam56tfq2/autorestart.rar Drop battleye folder into serverRoot\instance_11_Chernarus\ The others 3 .bat files must be in your serverRoot- then change paths for all this files as i say above in "step by step": Monitor.bat // Premod_restart.bat // BEC Control Epoch.bat // Scheduler.xml // Config.cfg Once you do all it... just start your server with monitor.bat I am getting a error with your way while loading it says error the process BEC.exe can not be found and i am sure i have changed the paths correct :( juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted November 6, 2016 Report Share Posted November 6, 2016 its ok, the error is cuz at first time.. thers not bec running... but when its time to make the restart thers bec to shutdown EagerBeaver 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 6, 2016 Author Report Share Posted November 6, 2016 7 hours ago, juandayz said: @EagerBeaver ///DOING .BAT FILES/// STEP 1: Do a .bat file called "Monitor" and paste this. (change the paths for your server routes) @echo off cls echo Watching arma2oaserver For Crashes/Restarts... echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter. title Raklatif's Arma2OA Monitor set becpath="C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec" cd /d %becpath% :arma2oaserver start "BattleEye Extended Control" "BEC Control Epoch.bat" echo (%time%) arma2oaserver started. start /wait "arma2" /min /high "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -cpuCount=2 -maxmem=2047 -exThreads=1 -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. // TIMEOUT /T 180 /NOBREAK goto arma2oaserver ******Now paste this .bat file in your server root. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Step 2: Do a .bat file called "BEC Control Epoch" and paste this into: (change the paths for your server) :: KILL BATTLEYE taskkill /im Bec.exe timeout 1 TIMEOUT /T 60 /NOBREAK cd\ cd "C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec" Bec.exe -f Config.cfg --dsc ***Now paste this .bat file in ...\instance_11_Chernarus\BattlEye\Bec --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 3: Do a .bat file called "Premod_restart" and paste this into: (change the paths for your server) @echo off echo Stopping server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start /wait Premod_stop.bat echo Backing up database start /wait Premod_backup.bat echo Starting BEC cd C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec start Bec.exe -f Config.cfg echo Starting server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start "arma2" /min "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" ping 127.0.0.1 -n 5 >NUL ***Now paste this .bat file in your server root ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 4: Do a .bat file called "Premod_stop" and paste this into: (change the paths for your server) @echo off taskkill /F /IM arma2oaserver.exe taskkill /F /IM Bec.exe exit ***Now paste this .bat file in your server root ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /// EDITING YOUR BEC`s Files /// STEP 5: go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config and open whit Note++ your Shedule.xml ***Now u needs add this at every last shedule id job: <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> (change for ur server paths) This is my example: <Scheduler> <!-- 12:00 AM restart --> <job id="0"> <time>23:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="1"> <time>23:55:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 5 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="2"> <time>23:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="3"> <time>00:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <job id="4"> <time>00:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\Users\Administrador\Desktop\Dayz Epoch Server\Premod_restart.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 12:00 AM restart --> ***Do the same for each job id group. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- STEP 6: Now go to YourServerRoot\instance_11_Chernarus\BattlEye\Bec\Config\ and open whit note++ your Config.cfg Ip = 127.0.0.1 Port = 2302 BePath = C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye (Here put your Bec Path) Admins = Admins.xml Commands = Commands.xml Any doubt here you have my files...http://www.mediafire.com/download/6afp6inam56tfq2/autorestart.rar Drop battleye folder into serverRoot\instance_11_Chernarus\ The others 3 .bat files must be in your serverRoot- then change paths for all this files as i say above in "step by step": Monitor.bat // Premod_restart.bat // BEC Control Epoch.bat // Scheduler.xml // Config.cfg Once you do all it... just start your server with monitor.bat Nevermind :) All seems to be good.. It loads up BEC after the 60 second timer counts down :) So i think it works.. Will find out next server restart in 3 hours lol Thank you so much for your help juandayz ... Link to comment Share on other sites More sharing options...
juandayz Posted November 6, 2016 Report Share Posted November 6, 2016 Just now, EagerBeaver said: Nevermind :) All seems to be good.. It loads up BEC after the 60 second timer counts down :) So i think it works.. Will find out next server restart in 3 hours lol Thank you so much for your help juandayz ... ;) for test it... do not wait for the next restart.. just down your server.. and let "monitor.bat" make his work automatically EagerBeaver 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 6, 2016 Author Report Share Posted November 6, 2016 Awesome it works :D Thank you so so so much its been doing my head in all weekend lol .... juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted November 6, 2016 Report Share Posted November 6, 2016 nice! :) @EagerBeaver ! Link to comment Share on other sites More sharing options...
Tech_Support Posted November 6, 2016 Report Share Posted November 6, 2016 This Monitor script RESTARTS YOUR SERVER!!! I run BEC when BEC Scheduler runs command <cmd>#shutdown</cmd> YOUR server will SHUTDOWN/CLOSE WHAT DOES THE SCRIPT SAY: echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. I run this script and it restarts the server upon crash/shutdown/close In fact you have to exit the script and stop it running before you can turn the server off or the script will try and restart the server every time. its also not hard to edit this script so it will start BEC after it starts the SERVER. https://epochmod.com/forum/topic/14278-release-free-server-monitor-restart-script/ Replace the line in bold with your Startup Bat Parameters, and make sure you include the /wait"after the start. Place this save as a .bat and place in your Server's root folder. (OPTIONAL) Add this to your autorun folder to have this run on startup. SCRIPT: @echo off cls echo Watching arma2oaserver For Crashes/Restarts... echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter. title Raklatif's Arma2OA Monitor :arma2oaserver echo (%time%) arma2oaserver started.start /wait "arma2" /min "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserver juandayz 1 Link to comment Share on other sites More sharing options...
Tech_Support Posted November 6, 2016 Report Share Posted November 6, 2016 you dont need lots of files all you need is to edit that monitor script so it starts BEC at the same time or just after the server and the monitor script will then restart both the server and BEC every time the Scheduler runs command <cmd>#shutdown</cmd> or your server just crashes its the way i do it anyway. juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted November 6, 2016 Report Share Posted November 6, 2016 17 hours ago, Tech_Support said: you dont need lots of files all you need is to edit that monitor script so it starts BEC at the same time or just after the server and the monitor script will then restart both the server and BEC every time the Scheduler runs command <cmd>#shutdown</cmd> or your server just crashes its the way i do it anyway. mm i a lil confused about this way tech... so at first you use the same (i use a little modify of this vercion) monitor.bat monitor.bat Spoiler @echo off cls echo Watching arma2oaserver For Crashes/Restarts... echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter. title Raklatif's Arma2OA Monitor :arma2oaserver echo (%time%) arma2oaserver started.start /wait "arma2" /min "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserver this file is only for check if server are running or not and execute the server if is down.. but really cant see where you call the BEC process and where you kill it :) (or you do it manually? ) or just run another .bat to shutdown the server process through your windows OS.? think its better your way cuz i use 3 .bat files you only 1. BUt if u dont call the BEC how autorestart works? Link to comment Share on other sites More sharing options...
Tech_Support Posted November 7, 2016 Report Share Posted November 7, 2016 This is not tested you might need to play with the file paths but is similar to what i was using before i started using TCAdmin. @echo off cls echo Watching arma2oaserver For Crashes/Restarts... echo If you want to close arma2oaserver and this script, close the arma2oaserver window and type Y depending on your language followed by Enter. title Raklatif's Arma2OA Monitor :arma2oaserver echo Starting BEC cd C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec start Bec.exe -f Config.cfg echo (%time%) Battleye Extended Controls started. echo Starting server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start "arma2" /min "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) arma2oaserver started. echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserver On a dedi or vps if you start your server with Raklatif's monitor script after you make edits to include BEC so Bec starts up with the server once you have the server and BEC launching with Raklatif's monitor script thats all you need to do. If you start your server and start BEC and BEC can not connect to your Server what happens BEC stops & shuts down If you start your server and start BEC and BEC has errors what happens BEC stops & shuts down If you start your server and start BEC and BEC connects to your server when you close the server cmd box BEC stops & shuts down almost at the same time I have never needed to task kill anything. I see you also back up you could include it all in the 1 batch script What that script does is monitors the process if at any point the process stops/crashes/shuts down the monitor script will echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserver ( Tells the batch script to run from :arma2oaserver ) echo Starting BEC cd C:\Users\Administrador\Desktop\Dayz Epoch Server\instance_11_Chernarus\BattlEye\Bec start Bec.exe -f Config.cfg echo (%time%) Battleye Extended Controls started. echo Starting server cd C:\Users\Administrador\Desktop\Dayz Epoch Server start "arma2" /min "C:\Users\Administrador\Desktop\Dayz Epoch Server\arma2oaserver.exe" -port=2302 "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) arma2oaserver started. echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserver Link to comment Share on other sites More sharing options...
Tech_Support Posted November 7, 2016 Report Share Posted November 7, 2016 If you run more than 1 server change this line echo Watching arma2oaserver For Crashes/Restarts... to something like echo Watching arma2EpochCherno For Crashes/Restarts... echo Watching arma2EpochLingor For Crashes/Restarts... echo Watching arma2EpochNamalsk For Crashes/Restarts... So then you can tell what Monitor script is monitoring what server running I ran 6 servers used the same monitor script for each server just changed ports and file paths and the name so i could tell what batch script was monitoring what server. juandayz 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 7, 2016 Author Report Share Posted November 7, 2016 Ok :) Hey again lol I know i am full of questions but here goes 1 more lol and you guys have been super helpful so i dont blame you if you tell me to figure it out myself lol But is there a way to get the actual server loading process before a player joins the server ? It seems much quicker for players to join once the server is already loaded and sometime i am having problems on my server where the first player to log-on after a restart they get stuck in the map screen and dont load there player in game unless you click cancel and re-log in.. Its not a big deal because it only seems to only happen for the first player to join.. Also a link to a decent server clean-up script would be tops :) Thanx guys :) Link to comment Share on other sites More sharing options...
juandayz Posted November 7, 2016 Report Share Posted November 7, 2016 @EagerBeaver in your CUSTOM! compiles.sqf find and try it: // 120 sec timeout (12000 * 0.01) while { _timeOut < 12000 } do { if (dayz_clientPreload && dayz_authed) exitWith { diag_log "PLOGIN: Login loop completed!"; }; replace by: // 120 sec timeout (12000 * 0.01) while { _timeOut < 12000 } do { if (dayz_clientPreload && dayz_authed) exitWith { diag_log "PLOGIN: Login loop completed!"; endLoadingScreen; }; Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 7, 2016 Author Report Share Posted November 7, 2016 18 minutes ago, juandayz said: @EagerBeaver in your CUSTOM! compiles.sqf find and try it: // 120 sec timeout (12000 * 0.01) while { _timeOut < 12000 } do { if (dayz_clientPreload && dayz_authed) exitWith { diag_log "PLOGIN: Login loop completed!"; }; replace by: // 120 sec timeout (12000 * 0.01) while { _timeOut < 12000 } do { if (dayz_clientPreload && dayz_authed) exitWith { diag_log "PLOGIN: Login loop completed!"; endLoadingScreen; }; Your fast lol :P I just tried what your little script but it did not work.. I did not get any errors in my .rpt it just did not start loading anything :) Thanx for trying but.. This is no rush :) And after searching lots of other server owners are trying to figure out the same thing :) juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted November 7, 2016 Report Share Posted November 7, 2016 3 hours ago, EagerBeaver said: Your fast lol :P I just tried what your little script but it did not work.. I did not get any errors in my .rpt it just did not start loading anything :) Thanx for trying but.. This is no rush :) And after searching lots of other server owners are trying to figure out the same thing :) mmm this is for fix the players stuuck on loading screen. works on my server :) but maybe i understand you bad.. and this is not what you need EagerBeaver 1 Link to comment Share on other sites More sharing options...
Tech_Support Posted November 7, 2016 Report Share Posted November 7, 2016 2 hours ago, EagerBeaver said: Ok :) Hey again lol I know i am full of questions but here goes 1 more lol and you guys have been super helpful so i dont blame you if you tell me to figure it out myself lol But is there a way to get the actual server loading process before a player joins the server ? It seems much quicker for players to join once the server is already loaded and sometime i am having problems on my server where the first player to log-on after a restart they get stuck in the map screen and dont load there player in game unless you click cancel and re-log in.. Its not a big deal because it only seems to only happen for the first player to join.. Also a link to a decent server clean-up script would be tops :) Thanx guys :) Add -autoInit to your commandline For server clean up check your events in mysql EagerBeaver 1 Link to comment Share on other sites More sharing options...
Tech_Support Posted November 7, 2016 Report Share Posted November 7, 2016 I even used that monitor batch script to monitor my arma3 servers also just changed up the commandline/file paths/ports and renamed arma2server monitor to arma3server monitor EagerBeaver 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 12, 2016 Author Report Share Posted November 12, 2016 Hey guys :) Would someone like to share there premod_backup.bat file ? I am starting to get a error now saying that it cant find this file.. Even though it started and ran without it for a few days before giving me this error :-\ Which is a little strange lol I have just removed the backup process from the restart.bat so i dont get a error until someone can help me out with this file :) Thanx in advance :) Link to comment Share on other sites More sharing options...
juandayz Posted November 12, 2016 Report Share Posted November 12, 2016 3 hours ago, EagerBeaver said: Hey guys :) Would someone like to share there premod_backup.bat file ? I am starting to get a error now saying that it cant find this file.. Even though it started and ran without it for a few days before giving me this error :-\ Which is a little strange lol I have just removed the backup process from the restart.bat so i dont get a error until someone can help me out with this file :) Thanx in advance :) @echo off FOR /F "tokens=1-4 DELIMS=/ " %%F IN ('date /T') DO (set v_date=%%F%%G%%H) FOR /F "tokens=1-4 DELIMS=: " %%F IN ('time /T') DO (set v_time=%%F%%G%%H) set fname=database_%v_date%_%v_time%.sql cd {PATH_TO_MYSQL_BIN} mysqldump.exe -e -u{DB_USERNAME} -p{DB_PASSWORD} {DB_NAME} > {PATH_TO_BACKUP_FOLDER}\%fname% exit EagerBeaver 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 13, 2016 Author Report Share Posted November 13, 2016 6 hours ago, juandayz said: @echo off FOR /F "tokens=1-4 DELIMS=/ " %%F IN ('date /T') DO (set v_date=%%F%%G%%H) FOR /F "tokens=1-4 DELIMS=: " %%F IN ('time /T') DO (set v_time=%%F%%G%%H) set fname=database_%v_date%_%v_time%.sql cd {PATH_TO_MYSQL_BIN} mysqldump.exe -e -u{DB_USERNAME} -p{DB_PASSWORD} {DB_NAME} > {PATH_TO_BACKUP_FOLDER}\%fname% exit Thank you very much kind sir :) You are a champion :) juandayz 1 Link to comment Share on other sites More sharing options...
EagerBeaver Posted November 13, 2016 Author Report Share Posted November 13, 2016 NVM Link to comment Share on other sites More sharing options...
LadyVal Posted March 27, 2018 Report Share Posted March 27, 2018 Hey guys. Question: how do you do these (the schedule backup and restart) in a hosted server. (it is not in my computer) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now