Tech_Support Posted December 18, 2016 Report Share Posted December 18, 2016 Script from And I just made it 1 .bat file easy to use all you need to do is edit the Config settings section and the command line. Make a new .bat file on your desktop of your windows vps or dedi Paste this in it @echo off ::CREDITS::Raklatif's Arma2OA Monitor, f3cuk Database backup, juandayz ::CONFIG SETTINGS set becPath="C:\Overpoch_Server\Bec" set serverPath="C:\Overpoch_Server" set DB_USERNAME="Epoch" set DB_PASSWORD="1234567890" set DB_NAME="epoch_main" set PATH_TO_BACKUP_FOLDER="C:\backup" set PATH_TO_MYSQL_BIN="C:\wamp64\bin\mysql\mysql5.7.14\bin" ::END SETTINGS :arma2oaserver echo (%time%) Backing up database. 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% echo (%time%) DIR %PATH_TO_BACKUP_FOLDER% FILE %fname% ping 127.0.0.1 -n 5 >NUL echo Watching DayZ Overpoch Main Server 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 PUT YOUR SERVER NAME HERE (so you know what monitor is monitoring what server)! cd %becPath% echo (%time%) bec started. start Bec.exe -f Config.cfg cd %serverPath% echo (%time%) arma2oaserver started. start /wait "arma2" /min "C:\Overpoch_Server\arma2oaserver.exe" -port=2302 -autoInit -noSound -noPause "-config=instance_11_Chernarus\config.cfg" "-cfg=instance_11_Chernarus\basic.cfg" "-profiles=instance_11_Chernarus" -name=instance_11_Chernarus "-mod=@DayzOverwatch;@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserver If you run multiple servers create a file for each server on your desktop all you have to do is change the command lines and the config settings to suit each server on each file. This script will re-run everything from this label :arma2oaserver every time the server cmd box is closed so yes if bec shuts down the server after x amount of hrs the script will backup your sql will re-start Bec & the Server If your server cmd box closes for some unknown reason this will terminate connection with Bec and so Bec shuts down but dont worry the script will backup your database then restart bec and your server (dont believe me try it run this script then close your server cmd box while this script is running and watch the magic lol) OMOH71, gernika, oldmatechoc and 4 others 7 Link to comment Share on other sites More sharing options...
LunatikCH Posted December 18, 2016 Report Share Posted December 18, 2016 No h8 mate but i would recomend adding: --routines --events --triggers since this makes it more easy for people if they move, specially if they have like 10 custom events like me lol Gr8 Work Link to comment Share on other sites More sharing options...
Tech_Support Posted December 18, 2016 Author Report Share Posted December 18, 2016 Could have set variables for the command line and made it so people just had to edit the config settings only thought that after i posted it lol feel free to edit, add, improve and re-post. juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted December 18, 2016 Report Share Posted December 18, 2016 @Tech_Support great work!!!! check your inbox. Download BEC Here: http://www.mediafire.com/file/jtq8bd7b68llp1d/BattlEye1.6.rar Link to comment Share on other sites More sharing options...
Yori_Yagame Posted December 21, 2016 Report Share Posted December 21, 2016 Gostei do trabalho onde o jogo esta pasta dentro da BattlEye dentro da instance_11_Chernarus ou da independência ou da raiz do jogo Link to comment Share on other sites More sharing options...
juandayz Posted December 21, 2016 Report Share Posted December 21, 2016 54 minutes ago, Yori_Yagame said: Gostei do trabalho onde o jogo esta pasta dentro da BattlEye dentro da instance_11_Chernarus ou da independência ou da raiz do jogo en el lugar donde usted esta definiendo el directorio del BEC. in the place where you define the bec directory. set becPath="C:\Overpoch_Server\Bec" si usted va a poner la carpeta battleye dentro de la "instance_11_chernarus" entones: if you gonna drop the battleye folder into "instance_11_chernarus" then: set becPath="your seerver root\instance_11_Chernarus\BattlEye\Bec" Link to comment Share on other sites More sharing options...
Yori_Yagame Posted December 21, 2016 Report Share Posted December 21, 2016 Olá amigo eu fiz tudo certinho mas estou recebendo o seguinte erro dê uma olhada nessa print http://prntscr.com/dma6z0 Link to comment Share on other sites More sharing options...
juandayz Posted December 21, 2016 Report Share Posted December 21, 2016 6 minutes ago, Yori_Yagame said: Olá amigo eu fiz tudo certinho mas estou recebendo o seguinte erro dê uma olhada nessa print http://prntscr.com/dma6z0 you just need set up the @Tech_Support autorestart.bat something like this for chernarus: @echo off ::CREDITS::Raklatif's Arma2OA Monitor, f3cuk Database backup, juandayz ::CONFIG SETTINGS set becPath="C:\your server root\instance_11_Chernarus\BattlEye\Bec" set serverPath="C:\your server path" set DB_USERNAME="your MYSQL USER NAME" set DB_PASSWORD="your MYSQL PASSWORD" set DB_NAME="Your MYSQL DATA BASE" set PATH_TO_BACKUP_FOLDER="D:\epoch16\backups\"//enter here a folder to save your backups set PATH_TO_MYSQL_BIN="C:\xampp\mysql\bin"//this is for use with xamp ::END SETTINGS :arma2oaserver echo (%time%) Backing up database. 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% echo (%time%) DIR %PATH_TO_BACKUP_FOLDER% FILE %fname% ping 127.0.0.1 -n 5 >NUL echo Watching DayZ EPoch 1.6 Main Server 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 PUT YOUR SERVER NAME HERE (so you know what monitor is monitoring what server)! cd %becPath% echo (%time%) bec started. start Bec.exe -f Config.cfg cd %serverPath% echo (%time%) arma2oaserver started. start /wait "arma2" /min "C:\your server path\arma2oaserver.exe" -port=2302 -autoInit -noSound -noPause "-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 once you set it.. if ure using this path: set becPath="C:\your server root\instance_11_Chernarus\BattlEye\Bec" drop bec folder into the path from above. now open your your server path\instance_11_Chernarus\BattlEye\Bec\Config\ config.cfg BePath = C:\your server root\instance_11_Chernarus\BattlEye Link to comment Share on other sites More sharing options...
Yori_Yagame Posted December 22, 2016 Report Share Posted December 22, 2016 Olá amigo fiz tudo certinho porém quando estou jogando não aparece mensagem nenhuma em que meu servidor está para reiniciar e quando chega a hora de reiniciar Ele simplesmente cai do nada mas não avisa. Eu já fiz todas as as com as configurações ( Scheduler ) 1 monitor: http://prntscr.com/dmjjfd 2: Premod_restart : http://prntscr.com/dmjjx9 3: BEC Control Epoch : http://prntscr.com/dmjkjz 4: Config.cfg : http://prntscr.com/dmjl34 Link to comment Share on other sites More sharing options...
juandayz Posted December 22, 2016 Report Share Posted December 22, 2016 5 hours ago, Yori_Yagame said: Olá amigo fiz tudo certinho porém quando estou jogando não aparece mensagem nenhuma em que meu servidor está para reiniciar e quando chega a hora de reiniciar Ele simplesmente cai do nada mas não avisa. Eu já fiz todas as as com as configurações ( Scheduler ) 1 monitor: http://prntscr.com/dmjjfd 2: Premod_restart : http://prntscr.com/dmjjx9 3: BEC Control Epoch : http://prntscr.com/dmjkjz 4: Config.cfg : http://prntscr.com/dmjl34 but this is not about premod.bat-- bec Control Epoch.bat and all of them.. This post is about a new Autorestart by @Tech_Support . he made all of this in one single file. read the main post if u wanna use the old way go to this post: Link to comment Share on other sites More sharing options...
juandayz Posted December 22, 2016 Report Share Posted December 22, 2016 1-create monitor.bat paste inside: (edit lines in red to put your paths) Spoiler @echo off ::CREDITS::Raklatif's Arma2OA Monitor, f3cuk Database backup, juandayz ::CONFIG SETTINGS set becPath="C:\epochserver\instance_11_Chernarus\BattlEye\Bec" set serverPath="C:\epochserver" set DB_USERNAME="your mysql username" set DB_PASSWORD="your mysql pass" set DB_NAME="your mysql database name" set PATH_TO_BACKUP_FOLDER="C:\epochserver\backups\" set PATH_TO_MYSQL_BIN="C:\xampp\mysql\bin" ::END SETTINGS :arma2oaserver echo (%time%) Backing up database. 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% echo (%time%) DIR %PATH_TO_BACKUP_FOLDER% FILE %fname% ping 127.0.0.1 -n 5 >NUL echo Watching DayZ EPoch 1.6 Main Server 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 PUT YOUR SERVER NAME HERE (so you know what monitor is monitoring what server)! cd %becPath% echo (%time%) bec started. start Bec.exe -f Config.cfg cd %serverPath% echo (%time%) arma2oaserver started. start /wait "arma2" /min "C:\epochserver\arma2oaserver.exe" -port=2302 -autoInit -noSound -noPause "-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 save it into your server root c:\epochserver\. 2-download and place battleyefolder into your server root \instance_11_Chernarus\ overwrite your battleyefolder Download BEC Here: http://www.mediafire.com/file/jtq8bd7b68llp1d/BattlEye1.6.rar 3- open YOUR SERVER ROOT\instance_11_Chernarus\BattlEye\Bec\Config\Config.cfg BePath = C:\epochserver\instance_11_Chernarus\BattlEye change for your path 4- Here im a lil confused cuz i think tech uses a shutdown by his S.O open YOUR SERVER ROOT\instance_11_Chernarus\BattlEye\Bec\Config\scheduler.xml <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:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> change in every where for your path: example: (see lines in red) Spoiler <?xml version="1.0"?> <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:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 12:00 AM restart --> <!-- 03:00 AM restart --> <job id="5"> <time>02: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="6"> <time>02: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="7"> <time>02: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="8"> <time>03: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="9"> <time>03:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 03:00 AM restart --> <!-- 06:00 AM restart --> <job id="10"> <time>05: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="11"> <time>05: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="12"> <time>05: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="13"> <time>06: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="14"> <time>06:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 06:00 AM restart --> <!-- 09:00 AM restart --> <job id="15"> <time>08: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="16"> <time>08: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="17"> <time>08: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="18"> <time>09: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="19"> <time>09:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 09:00 AM restart --> <!-- 12:00 PM restart --> <job id="20"> <time>11: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="21"> <time>11: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="22"> <time>11: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="23"> <time>12: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="24"> <time>12:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 12:00 PM restart --> <!-- 03:00 PM restart --> <job id="25"> <time>14: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="26"> <time>14: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="27"> <time>14: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="28"> <time>15: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="29"> <time>15:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 03:00 PM restart --> <!-- 06:00 PM restart --> <job id="30"> <time>17: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="31"> <time>17: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="32"> <time>17: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="33"> <time>18: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="34"> <time>18:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 06:00 PM restart --> <!-- 09:00 PM restart --> <job id="35"> <time>20: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="36"> <time>20: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="37"> <time>20:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 Server restart in 1 minute, Log out NOW!</cmd> <cmdtype>0</cmdtype> </job> <job id="38"> <time>21: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="39"> <time>21:00:10</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>C:\epochserver\monitor.bat</cmd> <cmdtype>1</cmdtype> </job> <!-- End 09:00 PM restart --> </Scheduler> gernika and S4M 2 Link to comment Share on other sites More sharing options...
Thug Posted August 15, 2017 Report Share Posted August 15, 2017 3rd Edit @Tech_Support So now I start your batch file. It starts, server starts and bec starts. When I shut down the server, the server closes and your batch file closes and after about 30 seconds the bec shuts down. Then nothing??? Never mine about the below: Forgot to put the bat file in the root of server. New problem. When I start the bat file it start the bec and the server starts. Whats wrong is that bec shuts off. Whats left is the server running and your dos batch file running. Edit: I fixed the above by adding --dsc to the end of start BecTavi13.exe -f Config.cfg. So it looks like this: start BecTavi13.exe -f Config.cfg -- dsc ----------------------------------------------------------------------------------------------------------------------------------------------- @Tech_Support When I run the bat file, the dos screen comes up. Then it starts the backup and I checked the backup location to see that they were there. That part works. Then it says: bec started. Then I get a white popup error that says: BecTavi13.exe Windows cannot find 'BecTavi13.exe'. Make sure you typed the name correctly, and then try again. I set the following up in a .bat file called SERVER_RESTART_Tavi.bat This is what I put in the file below, you will notice that I changed BEC.exe to BecTavi13.exe. I always rename the bec and they alway work. Spoiler @echo off ::CREDITS::Raklatif's Arma2OA Monitor, f3cuk Database backup, juandayz ::CONFIG SETTINGS set becPath="E:\Taviana 1061\instance_13_tavi\BattlEye\Bec" set serverPath="E:\Taviana 1061" set DB_USERNAME="Blah blah blah" set DB_PASSWORD="Blah blah blah" set DB_NAME="Blah blah blah" set PATH_TO_BACKUP_FOLDER="C:\backup" set PATH_TO_MYSQL_BIN="C:\xampp\mysql\bin" ::END SETTINGS :arma2oaserver echo (%time%) Backing up database. 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% echo (%time%) DIR %PATH_TO_BACKUP_FOLDER% FILE %fname% ping 127.0.0.1 -n 5 >NUL echo Watching DayZ Overpoch Main Server 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 Overpochins Taviana cd %becPath% echo (%time%) bec started. start BecTavi13.exe -f Config.cfg cd %serverPath% echo (%time%) arma2oaserver started. start /wait "arma2" /min "E:\Taviana 1061\arma2oaserver.exe" -port=2415 -autoInit -noSound -noPause "-config=instance_13_Tavi\config.cfg" "-cfg=instance_13_Tavi\basic.cfg" "-profiles=instance_13_Tavi" -name=instance_13_Tavi "-mod=@DayzOrigins;@DayzOverwatch;@DayZ_Epoch;@DayZ_Epoch_Server;" echo (%time%) WARNING: arma2oaserver closed or crashed, restarting. goto arma2oaserve Link to comment Share on other sites More sharing options...
_Lance_ Posted September 8, 2017 Report Share Posted September 8, 2017 Great idea but I run my server and bec as background processes using a mix of scripts and task scheduler, so when I run the batch file in the foreground (so I can watch the console when logged in) it thinks they're both down and starts new instances - I'm going to google but wanted to check with you first and see if there was a switch I could add that would make it look at background processes. I never realized most people ran their servers in the foreground, I guess I'm the exception but I like being able to just logoff the server and know it's just going to run and run, reboot every four hours until the power goes out or a hacker shuts it down lol. I guess worst-case I can just set the batch to start running in the background too. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now