andrew_ts 2 Posted June 25, 2015 I am trying to get my BEC Scheduler working to automate server restarts. Here is my BEC config.cfg:[Bec]IP = 24.255.58.153Port = 50000BePath = PathRemovedToProtectServerAdmins = Admins.xmlCommands = Commands.xml[Misc]ServerExeName = arma2aoserver.exeBan = 3ConsoleHeight = 30ConsoleWidth = 60Scheduler = Scheduler.xmlKickLobbyIdlers = 400ChatChannelFiles = TrueTimeout = 60 The following is my 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 Welcome to Ultima-Weapon's Universe! Join us on TS3 @ 24.255.58.153!!</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 EVERY 6 Hours at 0600hrs, 1200hrs, 1800hrs, 2400hrs (Arizona Time).</cmd></job><!-- 06:00 AM restart --><job id='2'> <day>1,2,3,4,5,6,7</day> <start>00:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours 30 minutes.</cmd></job><job id='3'> <day>1,2,3,4,5,6,7</day> <start>01:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours.</cmd></job><job id='4'> <day>1,2,3,4,5,6,7</day> <start>01:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours 30 minutes.</cmd></job><job id='5'> <day>1,2,3,4,5,6,7</day> <start>02:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours.</cmd></job><job id='6'> <day>1,2,3,4,5,6,7</day> <start>02:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3 hours 30 minutes.</cmd></job><job id='7'> <day>1,2,3,4,5,6,7</day> <start>03:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3.</cmd></job><job id='8'> <day>1,2,3,4,5,6,7</day> <start>03:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2 hours 30 minutes.</cmd></job><job id='9'> <day>1,2,3,4,5,6,7</day> <start>04:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2.</cmd></job><job id='10'> <day>1,2,3,4,5,6,7</day> <start>04:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1 hours 30 minutes.</cmd></job><job id='11'> <day>1,2,3,4,5,6,7</day> <start>05:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1.</cmd></job><job id='12'> <day>1,2,3,4,5,6,7</day> <start>05:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 30 minutes.</cmd></job><job id='13'> <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='14'> <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='15'> <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='16'> <day>1,2,3,4,5,6,7</day> <start>05:59:30</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 30 seconds, Log out NOW!</cmd></job><job id='17'> <day>1,2,3,4,5,6,7</day> <start>05:59:35</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 25 seconds, Log out NOW!</cmd></job><job id='18'> <day>1,2,3,4,5,6,7</day> <start>05:59:40</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 20 seconds, Log out NOW!</cmd></job><job id='19'> <day>1,2,3,4,5,6,7</day> <start>05:59:45</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 seconds, Log out NOW!</cmd></job><job id='20'> <day>1,2,3,4,5,6,7</day> <start>05:59:50</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 10 seconds, Log out NOW!</cmd></job><job id='21'> <day>1,2,3,4,5,6,7</day> <start>05:59:55</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 seconds, Log out NOW!</cmd></job><job id='22'> <day>1,2,3,4,5,6,7</day> <start>05:59:59</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd></job> <job id='23'> <day>1,2,3,4,5,6,7</day> <start>06:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>Z:\PathToServerFolder(RemovedToProtectServer)\@Restart_Server.bat</cmd></job><!-- End 06:00 AM restart --><!-- 12:00 PM restart --><job id='24'> <day>1,2,3,4,5,6,7</day> <start>06:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours 30 minutes.</cmd></job><job id='25'> <day>1,2,3,4,5,6,7</day> <start>07:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours.</cmd></job><job id='26'> <day>1,2,3,4,5,6,7</day> <start>07:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours 30 minutes.</cmd></job><job id='27'> <day>1,2,3,4,5,6,7</day> <start>08:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours.</cmd></job><job id='28'> <day>1,2,3,4,5,6,7</day> <start>08:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3 hours 30 minutes.</cmd></job><job id='29'> <day>1,2,3,4,5,6,7</day> <start>09:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3.</cmd></job><job id='30'> <day>1,2,3,4,5,6,7</day> <start>09:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2 hours 30 minutes.</cmd></job><job id='31'> <day>1,2,3,4,5,6,7</day> <start>10:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2.</cmd></job><job id='32'> <day>1,2,3,4,5,6,7</day> <start>10:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1 hours 30 minutes.</cmd></job><job id='33'> <day>1,2,3,4,5,6,7</day> <start>11:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1.</cmd></job><job id='34'> <day>1,2,3,4,5,6,7</day> <start>11:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 30 minutes.</cmd></job><job id='35'> <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='36'> <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='37'> <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='38'> <day>1,2,3,4,5,6,7</day> <start>11:59:30</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 30 seconds, Log out NOW!</cmd></job><job id='39'> <day>1,2,3,4,5,6,7</day> <start>11:59:35</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 25 seconds, Log out NOW!</cmd></job><job id='40'> <day>1,2,3,4,5,6,7</day> <start>11:59:40</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 20 seconds, Log out NOW!</cmd></job><job id='41'> <day>1,2,3,4,5,6,7</day> <start>11:59:45</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 seconds, Log out NOW!</cmd></job><job id='42'> <day>1,2,3,4,5,6,7</day> <start>11:59:50</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 10 seconds, Log out NOW!</cmd></job><job id='43'> <day>1,2,3,4,5,6,7</day> <start>11:59:55</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 seconds, Log out NOW!</cmd></job><job id='44'> <day>1,2,3,4,5,6,7</day> <start>11:59:59</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd></job><job id='45'> <day>1,2,3,4,5,6,7</day> <start>12:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>Z:\PathToServerFolder(RemovedToProtectServer)\@Restart_Server.bat</cmd></job><!-- End 12:00 PM restart --><!-- 06:00 PM restart --><job id='46'> <day>1,2,3,4,5,6,7</day> <start>12:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours 30 minutes.</cmd></job><job id='47'> <day>1,2,3,4,5,6,7</day> <start>13:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours.</cmd></job><job id='48'> <day>1,2,3,4,5,6,7</day> <start>13:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours 30 minutes.</cmd></job><job id='49'> <day>1,2,3,4,5,6,7</day> <start>14:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours.</cmd></job><job id='50'> <day>1,2,3,4,5,6,7</day> <start>14:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3 hours 30 minutes.</cmd></job><job id='51'> <day>1,2,3,4,5,6,7</day> <start>15:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3.</cmd></job><job id='52'> <day>1,2,3,4,5,6,7</day> <start>15:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2 hours 30 minutes.</cmd></job><job id='53'> <day>1,2,3,4,5,6,7</day> <start>16:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2.</cmd></job><job id='54'> <day>1,2,3,4,5,6,7</day> <start>16:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1 hours 30 minutes.</cmd></job><job id='55'> <day>1,2,3,4,5,6,7</day> <start>17:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1.</cmd></job><job id='56'> <day>1,2,3,4,5,6,7</day> <start>17:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 30 minutes.</cmd></job><job id='57'> <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='58'> <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='59'> <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='60'> <day>1,2,3,4,5,6,7</day> <start>17:59:30</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 30 seconds, Log out NOW!</cmd></job><job id='61'> <day>1,2,3,4,5,6,7</day> <start>17:59:35</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 25 seconds, Log out NOW!</cmd></job><job id='62'> <day>1,2,3,4,5,6,7</day> <start>17:59:40</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 20 seconds, Log out NOW!</cmd></job><job id='63'> <day>1,2,3,4,5,6,7</day> <start>17:59:45</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 seconds, Log out NOW!</cmd></job><job id='64'> <day>1,2,3,4,5,6,7</day> <start>17:59:50</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 10 seconds, Log out NOW!</cmd></job><job id='65'> <day>1,2,3,4,5,6,7</day> <start>17:59:55</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 seconds, Log out NOW!</cmd></job><job id='66'> <day>1,2,3,4,5,6,7</day> <start>17:59:59</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd></job><job id='67'> <day>1,2,3,4,5,6,7</day> <start>18:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>Z:\PathToServerFolder(RemovedToProtectServer)\@Restart_Server.bat</cmd></job><!-- End 06:00 PM restart --><!-- 12:00 AM restart --><job id='68'> <day>1,2,3,4,5,6,7</day> <start>18:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours 30 minutes.</cmd></job><job id='69'> <day>1,2,3,4,5,6,7</day> <start>19:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 5 hours.</cmd></job><job id='70'> <day>1,2,3,4,5,6,7</day> <start>19:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours 30 minutes.</cmd></job><job id='71'> <day>1,2,3,4,5,6,7</day> <start>20:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 4 hours.</cmd></job><job id='72'> <day>1,2,3,4,5,6,7</day> <start>20:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3 hours 30 minutes.</cmd></job><job id='73'> <day>1,2,3,4,5,6,7</day> <start>21:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 3.</cmd></job><job id='74'> <day>1,2,3,4,5,6,7</day> <start>21:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2 hours 30 minutes.</cmd></job><job id='75'> <day>1,2,3,4,5,6,7</day> <start>22:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 2.</cmd></job><job id='76'> <day>1,2,3,4,5,6,7</day> <start>22:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1 hours 30 minutes.</cmd></job><job id='77'> <day>1,2,3,4,5,6,7</day> <start>23:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 1.</cmd></job><job id='78'> <day>1,2,3,4,5,6,7</day> <start>23:30:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 Restart in 30 minutes.</cmd></job><job id='79'> <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='80'> <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='81'> <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='82'> <day>1,2,3,4,5,6,7</day> <start>23:59:30</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 30 seconds, Log out NOW!</cmd></job><job id='83'> <day>1,2,3,4,5,6,7</day> <start>23:59:35</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 25 seconds, Log out NOW!</cmd></job><job id='84'> <day>1,2,3,4,5,6,7</day> <start>23:59:40</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 20 seconds, Log out NOW!</cmd></job><job id='85'> <day>1,2,3,4,5,6,7</day> <start>23:59:45</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 15 seconds, Log out NOW!</cmd></job><job id='86'> <day>1,2,3,4,5,6,7</day> <start>23:59:50</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 10 seconds, Log out NOW!</cmd></job><job id='87'> <day>1,2,3,4,5,6,7</day> <start>23:59:55</start> <runtime>000000</runtime> <loop>0</loop> <cmd>say -1 This server will restart in 5 seconds, Log out NOW!</cmd></job><job id='88'> <day>1,2,3,4,5,6,7</day> <start>23:59:59</start> <runtime>000000</runtime> <loop>0</loop> <cmd>#shutdown</cmd></job><job id='89'> <day>1,2,3,4,5,6,7</day> <start>00:00:00</start> <runtime>000000</runtime> <loop>0</loop> <cmd>Z:\PathToServerFolder(RemovedToProtectServer)\@Restart_Server.bat</cmd></job><!-- End 12:00 AM restart --></Scheduler> Here is the @Restart_Server.bat I am trying to call:@echo offecho.timeout 5echo.echo KILL Napf Serverset serverkill="Z:\PathToServerFolder(RemovedToProtectServer)"cd /d %serverkill%taskkill /im arma2oaserver.exeecho KILL Napf Databaseset serverkill="Z:\PathToMySQLFolder(RemovedToProtectServer)\MySQL\bin"cd /d %serverkill%taskkill /im mysql.exeecho KILL Napf BECset serverkill="Z:\PathToBECFolder(RemovedToProtectServer)\Bec"cd /d %serverkill%taskkill /im Bec.exeecho. timeout 10echo Restarting Napf MySQL database. Please wait 5-10 seconds.start /D.\MySQL\MySQL.batping 127.0.0.1 -n 5 >NUL.\MySQL\cecho {0A} OK.{07}echo Executing spawn script....\MySQL\bin\mysql.exe --user=changedtoprotectserver --password=changedtoprotectserver --host=127.0.0.1 --port=changedtoprotectserver --database=changedtoprotectserver --execute="call pMain(1)"ping 127.0.0.1 -n 5 >NUL.\MySQL\cecho {0A} OK.{07}echo.echo Restarting Napf Serverset armapath="Z:\PathToServerFolder(RemovedToProtectServer)"cd /d %armapath%start "" "arma2oaserver.exe" -mod=@DayzOverwatch;@DayzOrigins;@DayZ_Epoch;@DayZ_Epoch_Server -name=DayZConfig -config=DayZConfig\server.cfg -cfg=DayZConfig\basic.cfg -profiles=DayZConfig -port=50000timeout 20echo Restarting Napf BECset becpath="Z:\PathToBECFolder(RemovedToProtectServer)\Bec"cd /d %becpath%start "" "Bec.exe" --dsc -f "Config.cfg"echo.echo Server Started 100%cls@exit I have 2 issues. The first is that BEC is not running the scheduled tasks in the scheduler.xmlThe second is that I am running 3 servers from the same computer and when I run the restart bat, it is shutting down all 3 servers at once (but is not shutting down the databases so they can be restarted as well). If someone could point me in the right direction for the scheduler, that is the primary thing i need.If someone can help me with the bat file so it won't close all the servers, just the one that scheduler is supposed to close, that would be great. I would like to thank anyone in advance for any help they could provide. Share this post Link to post Share on other sites
andrew_ts 2 Posted June 27, 2015 (edited) So I ended going a different route. I am using BERCon and a batch file to automate the entire server restart thing. The beautiful thing about going this route is having full control over the entire process. All three of my servers are now controlled by a single batch file. Edited June 27, 2015 by Ultima_weapon Share this post Link to post Share on other sites