4

I have specific schedules for my servers to go to the internet to update, currently have unattended updates schedule configured for a specific time of the day every day. It appears ubuntu advantage timer on my ubuntu 20.04 box has its own trigger that kicks off a couple times a day, at the wrong time. Obviously this conflicts with the internet schedules for the rest of my servers.

● ua-timer.timer - Ubuntu Advantage Timer for running repeated jobs
     Loaded: loaded (/lib/systemd/system/ua-timer.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Sat 2022-01-01 23:00:33 EST; 2 weeks 4 days ago
    Trigger: Thu 2022-01-20 13:00:47 EST; 3h 47min left
   Triggers: ● ua-timer.service

Jan 01 23:00:33 host systemd[1]: Started Ubuntu Advantage Timer for running repeated jobs.

Trying to edit the time, systemctl edit ua-timer.timer only gives me a blank override file. I cannot find any documentation about changing this timer or the syntax required, can someone point me in the right direction?

I would like to change the ua-timer to a specific time of the day.

1 Answer 1

3

There is not a great deal of configurability built into Ubuntu Advantage. The core settings can be found in /etc/ubuntu-advantage/uaclient.conf and a quick glance will see that setting specific times for the tool to run is not in there.

Additionally, you can list all available settings via the terminal with:

sudo ua config show

This will output the settings that are found in the uaclient.conf file, though:

http_proxy                 None
https_proxy                None
apt_http_proxy             None
apt_https_proxy            None
update_messaging_timer     21600
update_status_timer        43200
metering_timer             14400

These settings can be changed either by editing uaclient.conf followed by a sudo ua refresh config, or issuing a command in the terminal:

sudo ua config set metering_timer 28800

The timer values are listed in seconds. This translates to:

Seconds Readable Time
14400 4 hours
21600 6 hours
43200 12 hours

Based on the fleet of servers that I observe, Ubuntu Advantage times are triggered based on current uptime in seconds. As a result, if you want things to happen at 2:00am, you will need to reboot your server(s) at 2:00am and set the timer values to run accordingly. This is not something that I've tested myself, though.

You can read a tiny bit more from the documentation, but this is not a comprehensively-covered tool like some of the other aspects within Ubuntu.

You must log in to answer this question.