for all you BEC experts

for all you BEC experts

« posted: Oct 23, 2016, 11:35 PM »
ok got bec running and got it to restart every 4 hours. but i decided to change to every 12 hours .


I edited the scheduler and the restart works every 12 hours but the messages at the end (to announce the server is restarting) in 10, 5  and 1 mins like it used to with the 4 hour restarts doesnt work any longer  :-[    heres the code im running at the moment. Could anyone please tell me whats wrong.


It should be set to run 12 hours from restart not a timed restart...
thanks in advance




Code: [Select]
<Scheduler>
<!-- Messages every 1 minute -->
    <job id="0">
        <day>1,2,3,4,5,6,7</day>
        <start>000100</start>
        <runtime>001000</runtime>
        <loop>-1</loop>
        <cmd>say -1 The Server Will Restart Every 12 Hours Check Timer in HUD to see when restart will happen</cmd>
    </job>


    <job id="1">
        <day>1,2,3,4,5,6,7</day>
        <start>000200</start>
        <runtime>001000</runtime>
        <loop>-1</loop>
        <cmd>say -1 Please Join Our Teamspeak teamspeak3.i3d.net port 10216</cmd>
    </job>


    <job id="2">
        <day>1,2,3,4,5,6,7</day>
        <start>000300</start>
        <runtime>001000</runtime>
        <loop>-1</loop>
        <cmd>say -1 Please sign up to our website anarchygaming.uk</cmd>
    </job>


    <!-- Restarts -->
    <job id="3">
        <day>1,2,3,4,5,6,7</day>
        <start>119000</start>
        <runtime>000000</runtime>
        <loop>0</loop>
        <cmd>say -1 Server will restart in 10 minutes</cmd>
    </job>


    <job id="4">
        <day>1,2,3,4,5,6,7</day>
        <start>119500</start>
        <runtime>000000</runtime>
        <loop>0</loop>
        <cmd>say -1 Server will restart in 5 minutes</cmd>
    </job>


    <job id="5">
        <day>1,2,3,4,5,6,7</day>
        <start>119900</start>
        <runtime>000000</runtime>
        <loop>0</loop>
        <cmd>say -1 Server will restart in 1 minutes</cmd>
    </job>


    <job id="6">
        <day>1,2,3,4,5,6,7</day>
        <start>120000</start>
        <runtime>000000</runtime>
        <loop>0</loop>
        <cmd>#shutdown</cmd>
    </job>
</Scheduler>
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 606
  • Https://Fractured-Gaming.com

Re: for all you BEC experts

« Reply #1 posted: Oct 23, 2016, 11:51 PM »
I run a batch file that checks for the exe in the background then relaunch it... I can give you more info later on it after I get back from visiting my parents.
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 606
  • Https://Fractured-Gaming.com

Re: for all you BEC experts

« Reply #2 posted: Oct 24, 2016, 05:23 AM »
Sorry for the long wait... if you have full access to your server this is what I use.

https://github.com/Fractured-Gaming-Official/A3W_ServerMonitor

In the Bat files, there are plenty of comments that you will need to read and change some information. This will allow a monitor of your server and relaunch the Server, HC,and BEC.

After you edit both BAT files, convert the servermonitor.bat to an exe file. and run the exe. if it's all set up properly it will launch and monitor your server.

I still use BEC to shut the server down. The monitor system just relaunches it.

Very similar to my ts3 monitor: http://forums.a3wasteland.com/index.php?topic=3035.msg17614#msg17614
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline soulkobk
  • Hardened
  • ****
  • Posts: 100
  • soulkobk.blogspot.com.au

Re: for all you BEC experts

« Reply #3 posted: Oct 24, 2016, 08:42 AM »
Nice one Mokey...

Thanks for sharing your server monitor bat files (and bat2exe converter).

-soul.

Re: for all you BEC experts

« Reply #4 posted: Oct 24, 2016, 09:34 PM »
My .bat file work just like Mokeys, but that his is cleaner and laid out better.

Here is mine with TADST 3.0 working with it.

Quote
::Made by eRazeri Updated by Morgue2903
@echo off
:start
::RESTARTING BATTLEYE
set becpath="C:\%your server local%\A3server\battleye"
cd /d %becpath%
start "" /min "Bec.exe" --dsc -f Config.cfg
timeout 3
echo Starting BEC
::RESTARTING SERVER
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo Server monitored is not running, will be started now
start "" /wait "C:\%your server local%\A3server\arma3server.exe"  -port=2304 "-config=
C:\%your server local%\A3server\TADST\default\TADST_config.cfg" "-cfg=
C:\%your server local%\A3server\TADST\default\TADST_basic.cfg" "-profiles=
C:\%your server local%\A3server\TADST\default" -name=default -enableHT
echo Server started successfully
goto started
:loop
cls
echo Server is already running, running monitoring loop
:started
C:\Windows\System32\timeout /t 1
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 606
  • Https://Fractured-Gaming.com

Re: for all you BEC experts

« Reply #5 posted: Nov 01, 2016, 07:37 AM »
Nice one Mokey...

Thanks for sharing your server monitor bat files (and bat2exe converter).

-soul.

Sorry for the long response, SpecOps gave me the initial server monitor, I just modified it heavily :) I also have a TS3 monitor, I'm working on making it an EXE with C# also...
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline dekela
  • First Blood
  • ***
  • Posts: 79

Re: for all you BEC experts

« Reply #6 posted: Nov 01, 2016, 01:19 PM »
i use the following restart and monitor in one .bat very similar to morgue's
Code: [Select]
@echo off
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
title serverMonitorStratisWasteland.bat
:start
c:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | c:\Windows\System32\find /I /N "arma3.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo Stratis Wasteland Server started succesfully %date% %time%
cd C:\Games\ArmA3\A3Master\A3DS\profiles\BattlEye
start "" /min C:\Games\ArmA3\A3Master\A3DS\profiles\BattlEye\bec.exe -f Config.cfg --dsc
cd "C:\Games\ArmA3\A3Master\" 
start "" /HIGH /affinity 55 /min /wait "C:\Games\ArmA3\A3Master\arma3server.exe" -port=2302  -noPause -noSound -maxMem=2048 -enableHT -cfg=A3DS\basic.cfg -config=A3DS\server.cfg -profiles=A3DS\Profiles -servermod= -mod=@infiSTAR_A3;@asm; -filePatching -noLogs -world=empty -autoinit -loadMissionToMemory
echo Arma3 Stratis Wasteland server not found, will be started now!
goto started
:loop
cls
echo Stratis Wasteland Server is already running, running monitoring loop
:started
c:\Windows\System32\timeout /t 10
c:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | c:\Windows\System32\find /I /N "arma3.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
c:\Windows\System32\taskkill /im arma3server.exe
goto start
exit

starts the window, minimises it and names it (useful for multi servers)
echo's a message server started and time/date of restart
starts BEC, starts Arma, sets affinity, port etc
monitors Arma, and if not found, echo's a message and restarts both again
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 606
  • Https://Fractured-Gaming.com

Re: for all you BEC experts

« Reply #7 posted: Nov 01, 2016, 01:23 PM »
I also run HC and it monitors BEC for me too.
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!