RastaLulz ツ

Automatic Restarts with Windows Server 2012 R2?

10 posts in this topic

Hi guys,

 

I keep posting threads with BEC and fixes, but I am new to BEC. I don't know how to set it up. Does anyone recommend a way I can use automatic restarts with arma3server.exe so that every 4 hours, the server auto restarts for new missions / crates / loot / wipes etc to pop up?

 

I tried:

BEC

DaemonFire Pro or FireDaemon Pro (I forgot the name)

Windows Task Scheduler itself..

 

None has worked for me.. I can't simply figure it out.. Normally I would do it off a host as it's 10x easier. How are other people doing it? I read and follow all tutorials but I am always missing something..


Thanks for any assistance...

Share this post


Link to post
Share on other sites

have you tried the 1 built into exile? in the @exileserver\addons\exile_server_config.pbo  edit config.cpp

look for rcon section

 

Share this post


Link to post
Share on other sites
Advertisement
8 hours ago, tinboye said:

have you tried the 1 built into exile? in the @exileserver\addons\exile_server_config.pbo  edit config.cpp

look for rcon section

 

Does it work with TADST + Windows Server 2012 R2?

Share this post


Link to post
Share on other sites
2 hours ago, RastaLulz ツ said:

Does it work with TADST + Windows Server 2012 R2?

I would't recommend TADST...

I use BEC to launch a bat file after x hours which shuts down the server.
I have a servermonitor running which checks if the server is down. If it is, it automatically restarts it

Share this post


Link to post
Share on other sites
2 hours ago, GolovaRaoul said:

I would't recommend TADST...

I use BEC to launch a bat file after x hours which shuts down the server.
I have a servermonitor running which checks if the server is down. If it is, it automatically restarts it

I tried BEC.. its never working for me. I even followed ibattle.org, can you explain what I can do instead of using TADST. BEC is giving me issues where it can't resolve the connection so it retries 3 or 4 times then closes down.

Edited by RastaLulz ツ

Share this post


Link to post
Share on other sites

In the past I just used this set of batch files: It might be crude, but it works:

name this file "start_server.bat"

Spoiler

@echo off

::Refer to the following URL for any commandline Parameter
::
::https://community.bistudio.com/wiki/Arma_3_Startup_Parameters
::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Name of Server
set "_servername=Name of Server"
::
title %_servername%
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to arma3server.exe
::
set "_armaserverpath=C:\Arma_3"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: port to server
::
set "_port=2302"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to server.cfg or config.cfg
::
set "_config=%_armaserverpath%\@ExileServer\config.cfg"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to basic.cfg or arma3.cfg
::
set "_cfg=%_armaserverpath%\@ExileServer\basic.cfg"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: folder name in your arma3server folder to store rpt
set "_profiles=%_armaserverpath%\exile"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: will create user folder under profiles folder
::
set "_name=exile"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: enter your client mods below
::
set "_mods=@Exile"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: enter mods that are only required by the server and not the clients.
::
set "_servermods=@exileserver"
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to ranking.log
::
set "_ranking=%_cfg%\ranking.log"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::  set the max memory your server will be allowed.
::  32-bit Windows + 32-bit game: 2047
::  64-bit Windows + 32-bit game: 3071
set "_maxmem=3071"
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: If Intel Processor Enable HyperThreading
set "_HT=-enableHT"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::If Intel Processor Change to a number 0,1,3,5,7. This will override
::auto detection (which use 3 for dualcore and 7 for quadcore).
::Example add below -exThreads=7
set "_exThreads=-enableHT=7"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::Option which allows define number of CPUs/cores available. The
::best way to simulate dual core on quad core is to use -cpuCount=2
::when you run the game and then change the affinity to 2 cores to 
::make sure additional cores can never be used when some over-scheduling
::happens. It might be also possible to set the affinity in the OS 
::before you launch the process, that would work as well. 
::
set "_cpu=4"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: tbb4malloc_bi or jemalloc_bi or system
::
set "_malloc=system"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
taskkill /f /fi "status eq not responding" /im arma3server.exe
taskkill /f /im arma3server.exe
timeout 1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
taskkill /f /im cmd.exe /fi "windowtitle eq servermonitor.bat"
timeout 1
::
echo Kill all instances for safety
timeout 3
::
echo Starting %_servername% Server...
::CHANGE THE DIRECTORY BELOW TO THE PROPER LOCATION
cd /d %_armaserverpath%
start "arma3server" /min /high "arma3server.exe" -port=%_port% "-config=%_config%" "-cfg=%_cfg%" "-profiles=%_profiles%" -name=%_name%  "-servermod=%_servermods%" "-mod=%_mods%" "-ranking=%_ranking%" -cpuCount=%_cpu% %_HT% %_exThreads% -maxMem=%_maxmem% -malloc=%_malloc% -nosplash -noSound -noPause -nobenchmark -world=empty -autoinit
timeout 5
echo %_servername% has started..
timeout 5
exit

 

and this file call it "servermonitor.bat"

Spoiler

@echo off
::
::Set Name of Server, the same as what you placed in server_start.bat
set "_servername=Name of Server"
::
::Add a \ at the end of path!
set "_armaserverpath=C:\Arma_3\"
::
::Set the time that monitor will check to see if server is down, in seconds
set "_time=180"
::
::
title %_servername%
:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo %_servername% is not running, will be started now 
:: SET DIRECTORY TO PROPER LOCATION
start "" /min /wait "%_armaserverpath%start_server.bat" 
timeout 30
::
echo Server started succesfully
goto started
:loop
cls
echo %_servername% is already running, running monitoring loop
:started
:: THESE ARE WERFAULT AND TASK KILLS
taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq %_servername%"
C:\Windows\System32\timeout /t %_time%
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

 

place these in your arma3server folder, then use server_start.bat to launch server after setting the variables.

once that runs it will exit, and then the monitor will remain open.

 

Share this post


Link to post
Share on other sites
On 16/03/2017 at 5:26 PM, tinboye said:

In the past I just used this set of batch files: It might be crude, but it works:

name this file "start_server.bat"

  Reveal hidden contents


@echo off

::Refer to the following URL for any commandline Parameter
::
::https://community.bistudio.com/wiki/Arma_3_Startup_Parameters
::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Name of Server
set "_servername=Name of Server"
::
title %_servername%
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to arma3server.exe
::
set "_armaserverpath=C:\Arma_3"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: port to server
::
set "_port=2302"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to server.cfg or config.cfg
::
set "_config=%_armaserverpath%\@ExileServer\config.cfg"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to basic.cfg or arma3.cfg
::
set "_cfg=%_armaserverpath%\@ExileServer\basic.cfg"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: folder name in your arma3server folder to store rpt
set "_profiles=%_armaserverpath%\exile"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: will create user folder under profiles folder
::
set "_name=exile"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: enter your client mods below
::
set "_mods=@Exile"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: enter mods that are only required by the server and not the clients.
::
set "_servermods=@exileserver"
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: path to ranking.log
::
set "_ranking=%_cfg%\ranking.log"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::  set the max memory your server will be allowed.
::  32-bit Windows + 32-bit game: 2047
::  64-bit Windows + 32-bit game: 3071
set "_maxmem=3071"
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: If Intel Processor Enable HyperThreading
set "_HT=-enableHT"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::If Intel Processor Change to a number 0,1,3,5,7. This will override
::auto detection (which use 3 for dualcore and 7 for quadcore).
::Example add below -exThreads=7
set "_exThreads=-enableHT=7"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::Option which allows define number of CPUs/cores available. The
::best way to simulate dual core on quad core is to use -cpuCount=2
::when you run the game and then change the affinity to 2 cores to 
::make sure additional cores can never be used when some over-scheduling
::happens. It might be also possible to set the affinity in the OS 
::before you launch the process, that would work as well. 
::
set "_cpu=4"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: tbb4malloc_bi or jemalloc_bi or system
::
set "_malloc=system"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
taskkill /f /fi "status eq not responding" /im arma3server.exe
taskkill /f /im arma3server.exe
timeout 1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
taskkill /f /im cmd.exe /fi "windowtitle eq servermonitor.bat"
timeout 1
::
echo Kill all instances for safety
timeout 3
::
echo Starting %_servername% Server...
::CHANGE THE DIRECTORY BELOW TO THE PROPER LOCATION
cd /d %_armaserverpath%
start "arma3server" /min /high "arma3server.exe" -port=%_port% "-config=%_config%" "-cfg=%_cfg%" "-profiles=%_profiles%" -name=%_name%  "-servermod=%_servermods%" "-mod=%_mods%" "-ranking=%_ranking%" -cpuCount=%_cpu% %_HT% %_exThreads% -maxMem=%_maxmem% -malloc=%_malloc% -nosplash -noSound -noPause -nobenchmark -world=empty -autoinit
timeout 5
echo %_servername% has started..
timeout 5
exit

 

and this file call it "servermonitor.bat"

  Reveal hidden contents


@echo off
::
::Set Name of Server, the same as what you placed in server_start.bat
set "_servername=Name of Server"
::
::Add a \ at the end of path!
set "_armaserverpath=C:\Arma_3\"
::
::Set the time that monitor will check to see if server is down, in seconds
set "_time=180"
::
::
title %_servername%
:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo %_servername% is not running, will be started now 
:: SET DIRECTORY TO PROPER LOCATION
start "" /min /wait "%_armaserverpath%start_server.bat" 
timeout 30
::
echo Server started succesfully
goto started
:loop
cls
echo %_servername% is already running, running monitoring loop
:started
:: THESE ARE WERFAULT AND TASK KILLS
taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq %_servername%"
C:\Windows\System32\timeout /t %_time%
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

 

place these in your arma3server folder, then use server_start.bat to launch server after setting the variables.

once that runs it will exit, and then the monitor will remain open.

 

I tried this. I started the server once, closed it because it worked, now it won't launch again. 

Share this post


Link to post
Share on other sites

Are you running the start bat or the monitor bat?

And did you change paths to server at all

Edited by tinboye

Share this post


Link to post
Share on other sites
On 20/03/2017 at 3:07 PM, tinboye said:

Are you running the start bat or the monitor bat?

And did you change paths to server at all

I was running start bat, it worked perfectly and no, not changed at all. Was just turning it off to edit something that was a few words in exile.altis.pbo, but now it doesn't load up anymore.

 

EDIT: I even turned off the server and turned it back on. Not working.

Edited by RastaLulz ツ

Share this post


Link to post
Share on other sites
Advertisement

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.