Jump to content

How to setup auto server restarts for Arma 3 Altis Life RPG servers


Elite IV
 Share

Recommended Posts

Quick guide on how to setup auto server restarts.

 

There are a lot of outdated guides and different versions floating around. Here is the most recent stuff i found online and got it working 2021.

 

 

Download BEC from here or from the forums mirror link here.

Extract all files into a new folder called "BEC" inside the Arma 3 folder server directory where arma3server is (You don't have to but for simplicity just add it here and move it later if you want to for whatever reason).

The contents extracted into the folder should have a few files like Bec.exe - Bec.lib, a few random files and 3 other folders.

Make sure there is a folder called "battleye" in your server directory and make sure the following files have been created:

beserver.cfg
BEServer_x64.cfg
bans.txt

Depending on what arma 3 server you run (32bit or 64bit) will depend on what beserver config file will be used during session.

Inside any of the BE SERVER configs put this inside it and edit it accordingly to your server.

RConPassword MYPASSWORDHERE
RConPort 2310

For some reason you don't need to set a password in the BEC's config file so don't worry about it but the password must be set for the server.

 

Open the config folder and inside that folder you will find a file called Config.cfg - Open it with a text editor.

 

Change these settings to suit your server:

# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = 127.0.0.1


# Set the RCon port to the server.
# The recommended port is game port + 3 (so 2305 by default).
# You must have a RCon port specified in BEServer_x64.cfg. Example: "RConPort 2305"
Port = 2310


# Set the path to the BattlEye directory that is currently in use by the server.
BePath = C:\Servers\xtg_arma3_altisliferpg\battleye

 

Next edit the "Scheduler.xml" and replace it with this:

You can edit this scheduler at any time. My one is 6 hours so the server will shutdown every 6 hours.

The format to change the time is this:

00 = HOURS 00 = MINUTES 00 = SECONDS

So if want job id=6 to run at 2 hours of server startup time i would put 020000. or 2 hours and 20 minutes would look like this: 022000.

There always must be 6 numbers in the <start> parameter and can never be empty.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<Scheduler>
	
	<!-- Server restarts every 6 hours warning-->
	<job id='0'>
		<day>1,2,3,4,5,6,7</day>
		<start>000010</start>
		<runtime>004500</runtime>
		<loop>-1</loop>
		<cmd>say -1 This server automatically restarts every 6 hours.</cmd>
	</job>	
	
	<!-- Server restarts in 2 hours warning-->
	<job id='1'>
		<day>1,2,3,4,5,6,7</day>
		<start>010000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 5 hours!</cmd>
	</job>	
	
	<!-- Server restarts in 1 hour warning-->
	<job id='2'>
		<day>1,2,3,4,5,6,7</day>
		<start>020000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 4 hours!</cmd>
	</job>
	
	<!-- Server restarts in 30 minutes warning-->
	<job id='3'>
		<day>1,2,3,4,5,6,7</day>
		<start>030000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 3 hours!</cmd>
	</job>
	
	<!-- Server restarts in 20 minutes warning-->
	<job id='4'>
		<day>1,2,3,4,5,6,7</day>
		<start>040000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 2 hours!</cmd>
	</job>
	
	<!-- Server restarts in 15 minutes warning-->
	<job id='5'>
		<day>1,2,3,4,5,6,7</day>
		<start>050000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart an hour!</cmd>
	</job>
	
	<!-- Server restarts in 10 minutes warning-->
	<job id='6'>
		<day>1,2,3,4,5,6,7</day>
		<start>053000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 30 minutes!</cmd>
	</job>
	
	<!-- Server restarts in 5 minutes warning-->
	<job id='7'>
		<day>1,2,3,4,5,6,7</day>
		<start>055000</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 10 minutes!</cmd>
	</job>
	
	<!-- Server restarts in 3 minutes warning-->
	<job id='8'>
		<day>1,2,3,4,5,6,7</day>
		<start>055500</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 5 minutes!</cmd>
	</job>
	
	<!-- Server restarts in 1 minute warning-->
	<job id='9'>
		<day>1,2,3,4,5,6,7</day>
		<start>055900</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>say -1 Alert: This server will automatically restart in 1 minute SYNC DATA NOW!!!</cmd>
	</job>
	
	<!-- Server restarting warning-->
	<job id='10'>
		<day>1,2,3,4,5,6,7</day>
		<start>060000</start>
		<runtime>000001</runtime>
		<loop>10</loop>
		<cmd>say -1 Alert: This server is automatically restarting now - DO NOT START OR DO ANY TASKS!!!</cmd>
	</job>
	
	<!-- Shutdown Server -->
	<job id='11'>
		<day>1,2,3,4,5,6,7</day>
		<start>060100</start>
		<runtime>000000</runtime>
		<loop>0</loop>
		<cmd>#shutdown</cmd>
	</job>

</Scheduler>

 

Create this batch file and make sure you change all the paths to your server etc.

Don't forge to set the "-bepath=" to the folder in the main directory of the server other you will run into issues as batteye needs to be configured correctly on the server.

 

You should also change the path of the "-cfg=" and "-config=" if they're not in your main server directory and is somewhere else.

@echo off
title XtG Arma 3 Altis Life RPG Server and BEC Monitor by Elite IV
mode con: cols=70 lines=7
COLOR 02
:start
echo Monitoring XtG Arma 3 Altis Life Server and BEC...
echo If errors arrise, please inform Elite IV to update the paths for this program.
tasklist /FI "arma3server_x64.exe" 2>NUL | find /I /N "arma3server_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
set svExe=C:\Servers\xtg_arma3_altisliferpg\arma3server_x64.exe
set svPort=2302
set svMod=@life_server;@extDB3;
cd "C:\Servers\xtg_arma3_altisliferpg\BEC"
start Bec.exe -f Config.cfg --dsc
start "" /wait "%svExe%" -autoinit -cfg=basic.cfg -config=config.cfg -profiles=ServerProfiles -bepath=C:\Servers\xtg_arma3_altisliferpg\battleye -nosound -port=%svPort% -serverMod=%svMod%;
echo BEC has shutdown the Arma 3 server - Restarting now.
goto started
:loop
cls
echo Arma 3 server and BEC is already running, running monitoring loop
:started
tasklist /FI "arma3server_x64.exe" 2>NUL | find /I /N "arma3server_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

 

That should be it, you should run the batch file that you just created from here only and it will run both the programs needed. BEC will start first then the Arma 3 server and it will wait until the arma 3 server is no longer in the process list then start both programs again.

BEC (with the files currently provided and not changed) will shutdown itself after it loses connection to the Arma 3 Server.

BattlEye-Extended-Controls-master.zip

  • Love It! 1

Community Director of [XtG] - Xtreme Tier Gaming Community AU/NZ

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Terms of Use We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.