Hi Roy,

Thanks for your helpful comment.

My problem here is that, apt-daily.timer invoke apt-daily.servcie which depends on /usr/lib/apt/apt.systemd.daily, apt.systemd.daily will do its job according to /etc/apt/apt.conf.d/20auto-upgrades and /etc/apt/apt.conf.d/50unattended-upgrades.

It's a dilemma because if I want to make apt-daily.timer function, I have to make the underlying /usr/lib/apt/apt.systemd.daily function normally, which means I have duplicate schedules, one is apt-daily.timer, and the other is the underling apt.systemd.daily.

My aim is to disable apt.systemd.daily but to keep apt-daily.timer function.

Seems the only way is to copy and customize a newly /usr/lib/apt/apt.systemd.daily


On 07/12/2016 01:22 AM, Roy Zuo wrote:
Hi Mian,

As per systemd.timer(7) you can change the timer to whatever frequency you would
like. The following should make update/upgrade happen monthly.

   OnCalendar=*-*-05 00:00

Probably you should disable apt-daily.timer all together and create a new one
named apt-monthly.timer so that your changes are not overridden by future
upgrades.  Also, you have to create a apt-monthly.service accordingly.

Modifications to `/etc/apt/apt.conf.d/10periodic` should still be needed if
you would like to go fully unattended.

   APT::Periodic::Unattended-Upgrade "1";

Still `/etc/apt/apt.conf.d/50unattended-upgrades` controls the packages you
would like to upgrade.

Regards,

Roy

On Mon, Jul 11, 2016 at 02:55:13PM +0200, [email protected] wrote:
Hi systemd experts here:

I'd like any advice/clue regarding scheduling apt automatic update/upgrade
and the possibility of bellow request:

The current largest interval between 2 scheduled update/upgrade is "every two weeks", is it possible to set the schedule to be monthly? for example, make
apt automatic update/upgrade only happen once on the 5th of each month?

Seems I can use systemd and apt-daily.timer to let apt automatic update/ upgrade happen multiple times each day, but apt-daily.timer cannot override the
daily apt update/upgrade with a less frequency such as once per month.

Regards,

Mian
Canonical Support and Technical Services
Email: [1][email protected]
Mobile: +86 139 1138 6220

References:

[1] mailto:[email protected]

--
Sts-team mailing list
[email protected]
Modify settings or unsubscribe at: https://lists.canonical.com/mailman/listinfo/sts-team


--
Roy Zuo

Canonical Support and Technical Services, Technical Support Engi (APAC)
Email: [email protected]
Mobile: +61 423 222 082



--
ubuntu-server mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Reply via email to