Jump to content
  • 0

Dedicated Server Auto Restarts


Triage

Question

Are there any WORKING auto restart tutorials out there for dedicated servers? I've a tried a good bit of them on other forums but none of them seem to be working. If someone could shoot me a link or explain briefly how to do this that would be great.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Use something like this at the end of you scheduler.xml

    <job id="12">
        <time>030000</time>
        <delay>000000</delay>
	<day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>F:\Dayz Server\restart.bat</cmd>
        <cmdtype>1</cmdtype>     
    </job> 

    <job id="13">
        <time>030000</time>
        <delay>000000</delay>
	<day>1,2,3,4,5,6,7</day>
        <loop>0</loop>
        <cmd>#shutdown</cmd>
        <cmdtype>0</cmdtype>     
    </job> 

Change the directory to your server folder, and create a batch file in it named restart.bat

 

inside restart.bat

cd "F:\DayZ Server"
timeout 30
taskkill /im arma2oaserver.exe
timeout 30
start "" "F:\Dayz Server\DayZ_Epoch_instance_16_panthera.bat\"
start dayzbec.bat

Change these directories as needed and point it to your server start batch for whatever you map your are running

 

 
Inside dayzbec.bat
timeout /t 30
cd "F:\Server Tools"
"F:\Server Tools\Bec.exe" -f config.cfg
exit

Again change the directories as needed

 

I'm sure there are much cleaner ways to do this but it's how I learned to do it and has been working for me for over a year.

 

 

As a bonus you can set your restart.bat like this

cd "F:\DayZ Server"
timeout 30
taskkill /im arma2oaserver.exe
timeout 10
:: Check to see if we have new pbos
IF EXIST "F:\DayZ Server\instance_16_panthera\ToGoLive\DayZ_Epoch_16.Panthera2" (
   rmdir /s /q "F:\DayZ Server\MPMissions\DayZ_Epoch_16.Panthera2"
   MOVE /Y "F:\DayZ Server\instance_16_panthera\ToGoLive\DayZ_Epoch_16.Panthera2" "F:\DayZ Server\MPMissions"
)
IF EXIST "F:\DayZ Server\instance_16_panthera\ToGoLive\dayz_server.pbo" (
    MOVE /Y "F:\DayZ Server\instance_16_panthera\ToGoLive\dayz_server.pbo" "F:\Dayz Server\@DayZ_Epoch_Server\addons"
)
timeout 45
start "" "F:\Dayz Server\DayZ_Epoch_instance_16_panthera.bat\"
start dayzbec.bat

And create a folder to put your mission file and server files in that will get automatically updated to your live files on restart or it will just skip it if there are no files found so you don't need to wait for restarts to update your server files.

Obviously you will need to change all your directories around in there to make it work properly.

Link to comment
Share on other sites

  • 0

I had a dedi server some time ago and used a batch file that was called from scheduler.xml to actually restart.  So I started a new dedicated server recently, only to find that scheduler.xml no longer calls the batch file.  The scheduler loads flawlessly.  No errors, all msgs, whether looping or not, work fine.  But the block that actually calls the batch file doesn't call it.  The server just continues on its merry way as if nothing happened, which nothing did!

 

Here's one of the restart blocks:

 

<job id='7'>
     <day>1,2,3,4,5,6,7</day>
        <start>15:00:00</start>
        <runtime>000000</runtime>
        <loop>0</loop>
        <cmd>c:\OverPochInsServer\Kill_Overpochins.bat</cmd>
</job>

 

The path is correct, and the batch file works perfectly if executed manually.  There are no error in any serer logs, error logs, or anywhere else.  It's as if the scheduler is just skipping over it.  Has there been a syntax change in scheduler.xml shorty before its demise?  I found I did have to make some changes to some of the other lines in order for it to work with the last BEC update.

 

Thanks,

Bob

Link to comment
Share on other sites

  • 0

I did do the trial but even following the instructions on the FD site, I couldn't get it set up right with the proper dependencies between keeping mySQL running, BEC, and Arma2OA itself and still use the scheduler.xml for in-game msgs and the actual server shutdowns.

Link to comment
Share on other sites

  • 0

OK, I'm trying it again.  I downloaded their XML files for both Arma2OA and BEC.  Edited the files for my paths, etc. Imported them both and started them both.  They're both running according to FD but there's no BEC actually running and no Arma2OA Server running. So what did I miss and how do I link BEC to Arma2OAServer?  I did some searches but it appears no one's got the details of actually making it run.

 

I'm going to try starting them with my normal  batch file and see if FD restarts them when they shut down according to the BEC scheduler - but that's a few hours away now.  Am I on the right path?

 

I'm also running on Windows Server 2012 R2 which does not have interactive services detection turned on.  Do I need it?  Many posts say yes, but according to Micro$oft, ISD could make a Windows Server 2012 (and R2) unstable.

Link to comment
Share on other sites

  • 0

OK, started the game with FireDaemon and then started BEC with FireDaemon.  I did have to make the registry change for Windows Server 2012 and R2 to enable ISD.  So now I can at least see that when I started both with FireDaemon, the game console starts and looks normal.  But BEC hangs.  I get a "Please wait... Connecting to the server when the Timeout has expired!"   After some time, not the timeout that I left at the default of 3,000ms (more like three minutes), it tries to connect with several messages "Connecting to Battleye server xxxx.xxxx.xxx.xxx.   No valid response.  Trying to reconnect." and then tries to restart BEC.   

 

So the game is now playable via Steam, DayzLauncher, etc. but BEC just keeps cycling every three minutes and never appears to actually run.  No message about tasks loaded so I'm guessing that it won't restart according to scheduler.xml since it never loads.  I've gone over the FD tabs for BEC and everything is right and matches my paths, etc.  Any idea what I may have missed?  

 

But wait.... there's more.... I copied my entire server file structure over to a new test file structure.  Cloned the FD BEC and Arma2OA processes and modified all paths and settngs for the new test server.  I also added /affinity 3 on my main server and /affinity C on my test server so as to restrict them to cores 0/1 and 2/3 respectively according to this post  I read that the processes will step on each other if on the same cores.   But I guess that format is wrong because I get "Unknown hive error" and the arma server crashes.  Without affinity, it works.  I'm putting the /affinity in the parameters box.  Is that not where it goes?

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...