The following message is a courtesy copy of an article
that has been posted to gmane.linux.debian.devel.general as well.

Bill Allombert <[email protected]> writes:

> Dear Debian developers,
>
> I am trying to fix bug #1089172
> popularity-contest: migrate cron job to systemd timer on Linux ports
>
> While this is reasonable thing to do, popcon has a number of unusual 
> requirements,
> hence the open-minded in the subject...

Could you say what the unusual requirements are? i couldnt tell from the bug

i think one issue is that sending email from systemd-timers is harder
than it should be due to an incompatibility between the way exim (and
maybe postfix) fork processes and systemd's assumptions about how things
should work

but generally you can:

- move the code that does the work from the current cron job file to new-script
- the cron job should a) if  [ -d /run/systemd/system ]; then exit 0; else 
new-script;fi
- the timer should start a service that runs new-script, and then does a "sleep 
10" to ensure exim can deliver the email before
  systemd kills the unit (see #1106030)
  (better workarounds welcomed)


the second step means cron is a no-op on systemd but will still operate for 
non-systemd

Reply via email to