Jump to content
Sign in to follow this  
Dragon_GER

[TOOL] ArmaScheduler - another RCON scheduler tool

Recommended Posts

Hello everyone,

 

i'd like to share a tool im using for my community to restart and broadcast messages on our server. It is windows only but i think it could be possible to migrate to .net core.

You can find the project here on github . It's is open-source and comes with an MIT license.

 

Features included:

  • ability to CRON tasks and messages
  • ability to setup reccuring tasks with startup delay and a delay between executions
  • auto restart server on crash
  • easy configuration via json settings file

 

Planned features are:

- including support for custom batch file execution

- ability to run multiple instances to run multiple server at the same time

- ability to reload the settings on the fly...

 

On first launch the Tool will generate a small settings.json example configuration onto your desktop.

A finished configuration can look something like this:

{
	"settings": {
		"ip": "127.0.0.1",
		"port": 2307,
		"password": "myfancyrcon",
		"repeat": 100,
		"timeout": 100,
		"hcCount": 3,
		"serverExecutable": "D:\\arma3\\arma3server_x64.exe",
		"hcParameter": "-client -connect=127.0.0.1 -port=2302",
		"serverParameter": "-port=2302 -config=D:\\Arma3\\TADST\\TF47\\TADST_config.cfg -cfg=D:\\Arma3\\TADST\\TF47\\TADST_basic.cfg -profiles=D:\\Arma3\\TADST\\TF47 -name=TF47-GM -filePatching -mod=gm;@ace;@ADV__ACE_CPR;@CBA_A3;@Task_Force_Arrowhead_Radio_BETA__;-autoInit -enableHT -servermod=@TCL;@InterceptDB"
	},
	"scheduledTasks": [
		{
			"time": "19:00:00",
			"rconCommand": "say -1 Server restart in 1 hour.",
			"executeTask": 0
		},
		{
			"time": "19:30:00",
			"rconCommand": "say -1 Server restart in 30 minutes.",
			"executeTask": 0
		},
		{
			"time": "19:50:00",
			"rconCommand": "say -1 Server restart in 10 minutes. Please bring all vehicles back to base. Bitte bringt alle Fahrzeuge zurück zur Basis.",
			"executeTask": 0
		},
		{
			"time": "20:00:00",
			"rconCommand": "say -1 RESTART!",
			"executeTask": 1
		}
	],
	"repeatingServices": [
		{
			"startupDelay": 0,
			"repeating": -1,
			"delay": 10,
			"rconCommand": "say -1 Restart times: [02:00, 08:00, 14:00, 20:00]",
			"executeTask": 0
		},
		{
			"startupDelay": 2,
			"repeating": -1,
			"delay": 15,
			"rconCommand": "#say -1 Schaut auch auf unserer Website und im Forum vorbei, unter taskforce47.com / forum.taskforce47.com",
			"executeTask": 0
		}
	]
}

Notice the two differend ways of setting up tasks?

Use scheduledTasks to setup CRON job like tasks. RepeatingServices on the other hand is used to configure reccuring tasks.

A small hint on  repeating Services: if you set repeating services to -1 it is gonna repeat forever. If you set it to a positive number, it is gonna repeat it the amount of times you have choosen.

 

Oh just a small hint regarding "time". It is only gonna use min and hours in your configuration. Any entered seconds will be ignored.

 

For more information you can read the readme file on github.

 

Download here: Click me

 

Thank you for reading,

Dragon

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey Whisker thank you very much.

The startupDelay parameter is used for inital wait before first execution of repeatingServices tasks. It is an delay factor in minutes.

So let's say you want your task to start executing 10min after tool start you just use 10. 0 if you  want your task to get executed immediately.

Share this post


Link to post
Share on other sites

Thank you very much. People ask if there are plans to develop "ArmaScheduler" for Linux version (console)? If so, in what time frame?

Share this post


Link to post
Share on other sites

Okay another quick Update. I finished a first linux build, it just needed some small changes. Hower i don't have any linux server to test at the moment. Hence not sure if everything related to server start will work as intended. Gonna push a first testbuild tomorrow!

  • Like 2

Share this post


Link to post
Share on other sites

After two days of testing, I discovered the following:
When starting the server and before restarting, all messages of "ArmaScheduler" are displayed on the Arma 3 server and in the ArmaScheduler console.
After the scheduled time restart of the server, messages are displayed only in the ArmaScheduler console, and there are no messages in the console of the Arma 3 server.

 

{
    "settings": {
        "ip": "127.0.0.1",
        "port": 2305,
        "password": "password",
        "repeat": 100,
        "timeout": 100,
        "hcCount": 0,
        "serverExecutable": "arma3server_x64.exe",
        "hcParameter": "",
        "serverParameter": "-cpuCount=8 -maxmem=4096 -noPause -nosplash -filePatching -servermod=@ASR_AI3;@ASR_AI3_RHS_config;@extDB3 -mod=@RHSSAF;@RHSGREF;@RHSUSAF;@RHSAFRF;@CUP_Weapons;@CUP_Vehicles;@CUP_Units;@CUP_Terrains_Maps;@CUP_Terrains_Core;@CBA_A3 -config=Server.cfg -cfg=basic.cfg -port=2302 -profiles=profilesServer -name=Server"
    },
    "scheduledTasks": [
        {
            "time": "03:00:00",
            "rconCommand": "say -1 Перезагрузка сервера через 1 час.",
            "executeTask": 0
        },
        {
            "time": "03:30:00",
            "rconCommand": "say -1 Перезагрузка сервера через 30 минут.",
            "executeTask": 0
        },
        {
            "time": "03:50:00",
            "rconCommand": "say -1 Перезагрузка сервера через 10 минут.",
            "executeTask": 0
        },
        {
            "time": "04:00:00",
            "rconCommand": "say -1 RESTART!",
            "executeTask": 1
        },
    ],
    "repeatingServices": [
        {
            "startupDelay": 0,
            "repeating": -1,
            "delay": 30,
            "rconCommand": "say -1 Рестарт сервера в: [04:00] по МСК",
            "executeTask": 0
        },
        {
            "startupDelay": 2,
            "repeating": -1,
            "delay": 31,
            "rconCommand": "say -1 bla-bla-bla",
            "executeTask": 0
        }
    ]
}

 

Share this post


Link to post
Share on other sites

That's normal behavior. Your message is sent while your server is allready shutdown. It will get logged to the console as soon the message is passed to the rcon connection. But it takes some time after the server shutdown for the connection to notice it's not alive anymore. Therefore it looks like the message has been send to server normaly.

That's also why i suggest to use a startupDelay of at least 1 min,.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×