Skip to content
7thCore edited this page Aug 28, 2022 · 1 revision

Timers

There are two systemd timers for the script.

Timer one triggers these functions every 6 hours at 00:00, 06:00, 12:00 and 18:00:

  • removal of old files
  • creates a backup of all running server instances
  • checks for updates

Timer two triggers these functions every 00, 15, 30, 45, minute mark except at 00:00, 06:00, 12:00 and 18:00 to not conflict with timer one:

  • removal of old files
  • checks for updates

The Only diffrence is that the second timer doesn't create a backup of all running server instances.


Changing the timers

WARNING: Make sure both timers don't trigger at the same time. This can cause problems. IF you don't know what you're doing, leave them as they are.

You can change when the timers trigger by creating an override for each timer with the following commands:

For the first timer:

systemctl --user edit arma3srv-timer-1.timer

For the second timer:

systemctl --user edit arma3srv-timer-2.timer

This will create a override.conf file and open it in a editor.

### Editing /srv/anvsrv/.config/systemd/user/arma3srv-timer-1.timer.d/override.conf
### Anything between here and the comment below will become the new contents of the file



### Lines below this comment will be discarded

### /srv/anvsrv/.config/systemd/user/arma3srv-timer-1.timer

To change the schedule of the timers you will have to edit both timers, one to add the new time and the other to remove the same time from it so both of them do not trigger at the same time. For this example we will change them so another backup will be done at 15:00 (3pm). Timers are written in a 24 hour format.

For the first timer:

### Editing /srv/anvsrv/.config/systemd/user/arma3srv-timer-1.timer.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Timer]
OnCalendar=
OnCalendar=*-*-* 00:00:00
OnCalendar=*-*-* 06:00:00
OnCalendar=*-*-* 12:00:00
OnCalendar=*-*-* 15:00:00
OnCalendar=*-*-* 18:00:00

### Lines below this comment will be discarded

### /srv/anvsrv/.config/systemd/user/arma3srv-timer-1.timer

For the second timer:

### Editing /srv/anvsrv/.config/systemd/user/arma3srv-timer-2.timer.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Timer]
OnCalendar=
OnCalendar=*-*-* *:15:00
OnCalendar=*-*-* *:30:00
OnCalendar=*-*-* *:45:00
OnCalendar=*-*-* 01:00:00
OnCalendar=*-*-* 02:00:00
OnCalendar=*-*-* 03:00:00
OnCalendar=*-*-* 04:00:00
OnCalendar=*-*-* 05:00:00
OnCalendar=*-*-* 07:00:00
OnCalendar=*-*-* 08:00:00
OnCalendar=*-*-* 09:00:00
OnCalendar=*-*-* 10:00:00
OnCalendar=*-*-* 11:00:00
OnCalendar=*-*-* 13:00:00
OnCalendar=*-*-* 14:00:00
OnCalendar=*-*-* 16:00:00
OnCalendar=*-*-* 17:00:00
OnCalendar=*-*-* 19:00:00
OnCalendar=*-*-* 20:00:00
OnCalendar=*-*-* 21:00:00
OnCalendar=*-*-* 22:00:00
OnCalendar=*-*-* 23:00:00

### Lines below this comment will be discarded

### /srv/anvsrv/.config/systemd/user/arma3srv-timer-2.timer

The diffrence between the normal and the modified timers now is that in the first timer we added the line OnCalendar=*-*-* 15:00:00 and we removed it from the second timer. The empty OnCalendar= line is mandatory to clear all trigger times or you are just adding them to the timer.