Jump to content

[RELEASE] Simple KeepAlive Batch Tool


Madman2077

Recommended Posts

Hello there fellow Epochians.
 
I will start off by saying that I am not competing with Uniflare. is very well written and certainly your choice if you need all those features.
His batch wasn't working out for our way of doing things however. We are using Windows Server's built in "Scheduler" program to run our restart events on. (this way they are always on time, everytime)
So for our specific needs we needed to write our own batch script that we could use with Scheduler to check if the server had crashed or not. This is by far not the best way of doing it but it works for us.
 
 

Setting it up:

 

Download the file first

 

1. Copy KeepAlive.bat to wherever you want to keep it on your server.

 

2. Edit the file (right click > edit) or open with Notepad++

 

3. Change the following line to include the path to your startup.bat (we have our batch files in seperate folders so we use this)

set epochpath="D:\Sector7Servers\Arma_3_Epoch_1"

4. Change StartServer.bat in the following line to the name of the batchfile that starts your server.

start "StartServer" "StartServer.bat"

Optional. Remove the last "timeout" line if you don't want the CMD window to be in your face every 5 minutes when the server hasn't crashed. 

 

 

Adding it to scheduler:

As I said above we run our tasks using the scheduler in Windows Server. If you don't know how to set this up follow the rest of the steps.

 

5. Open Taks Scheduler on your Windows Server and create a new task.

 

6. In the "General" tab fill in the name and description field.

 

7. Under the "Triggers" tab create a new trigger and set it to one time. I use these values for my set up:

date: today - Time: 3:02:00 PM

Repeat task every 5 minutes for the duration of indefinately

^ Note that I set it 2 minutes after the server is supposed to restart, it would not be good if it checked the status during a restart and interferred with the restart process.

 

8. save your trigger and go to the "Actions" tab. Here; create a new action of type "Start a program" and add your batch file as the "Program/script"

 

9. Save your action and task.

 

 

That's it. Your server will now check every 5 minutes to see if your server has crashed, and if so; restart it!

Of course this is by far not the best method to do it but hey, it works and is simple to set up!

 

- Rick from S7Gaming

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...