[systemd-devel] Calendar timer events on non-24/7 systems

Jan Janssen medhefgo at web.de
Tue Feb 5 08:54:10 PST 2013


Hello,

I was wondering how (calendar) timer events triggering occurs on systems that 
aren't running 24/7 (e.g. a typical desktop system). To do that I used these 
two simple units:

	[Unit]
	Description=Calendar Test Service
	[Service]
	Type=oneshot
	ExecStart=/usr/bin/systemd-cat -t calendar-test date

	[Unit]
	Description=Daily Timer Test
	[Timer]
	OnCalendar=daily
	Unit=calendar-test.service

And as I expected, the service isn't started on a daily basis on my computer  
since (calendar based) timers don't remember the last time they got activated 
after a fresh boot.

It would be nice if timers got scheduled based on their last time they got 
triggered. Best would be an option to toggle it per unit.

The main reason I was thinking about it was, that all /etc/cron.
{hourly,daily,weekly,monthly}/* scripts that are shipped by distros these days 
should actually be implemented as native timer units (by today's standards, 
they have no good reason to be shipped there anyways other than for legacy 
reasons). But those need a reliable way to make sure that they are actually 
run daily/weekly/monthly, even if the system reboots. Just like anacron does 
in some distros.

I wonder if this has been a deliberate decision or just been oversight. And if 
it's the latter, wether there are any plans to make reliable timer units 
across reboots possible,

Jan


More information about the systemd-devel mailing list