Migrate from cron to systemd timers

Bug #1817380 reported by Bryan Quigley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Just a quick draft write up (untested). Happy to test/propose a patch if +1 to change.

REPLACE:
update-notifier-common.cron.daily

WITH:
Timer File
/usr/lib/systemd/system/update-notifier-resume-incomplete.timer
[Unit]
Description=Try to rerun any package data downloads that failed at package install time.

[Timer]
OnCalendar=daily
AccuracySec=24h
Persistent=true

[Install]
WantedBy=timers.target

Service File
/usr/lib/systemd/system/update-notifier-resume-incomplete.service
[Unit]
Description=Try to rerun any package data downloads that failed at package install time.

[Service]
ExecStart=/usr/lib/update-notifier/package-data-downloader

Can Nice or otherwise restrict it via systemd.

REPLACE:
update-notifier-common.cron.weekly

WITH:
Timer File
/usr/lib/systemd/system/update-notifier-new-version.timer
[Unit]
Description=Check to see whether there is a new version of Ubuntu available

[Timer]
OnCalendar=weekly
AccuracySec=24h
Persistent=true

[Install]
WantedBy=timers.target

Service File
/usr/lib/systemd/system/update-notifier-new-version.service
[Unit]
Description=Check to see whether there is a new version of Ubuntu available

[Service]
ExecStart=/usr/lib/ubuntu-release-upgrader/release-upgrade-motd

Can Nice or otherwise restrict it via systemd.

Revision history for this message
Steve Langasek (vorlon) wrote :

What is the motivation for such a change? Is it strictly because you want to be able to nice these jobs?

We aren't at a point where generally speaking we are migrating cronjobs to timer units.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Nope (although that is nice - I personally care more about the other restrictions you can do). I posted to devel-discuss about moving from anacron/cron to timers
https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2019-February/018242.html

My count (in a disco LXD containder) we have 7 timers by default and 9 real cronjobs. (Anacron is also done via systemd timer now, so let's skip a step..)

Changed in update-notifier (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.