Page 1 sur 1

[timer] solution (élégante ?) au problème des timers

Publié : mar. 02 sept. 2014, 00:00
par Moviuro
Plop,

en réaction à l'article cron systemd du wiki ("controverse"), j'ai la solution suivante :

Code : Tout sélectionner

% cat timer-daily@.timer
[Unit]
Description=Daily Timer for the %i service

[Timer]
OnCalendar=daily
Persistent=true
Unit=%i.service

[Install]
WantedBy=multi-user.target

Code : Tout sélectionner

# systemctl enable timer-daily@{monservice}.timer
TADA ! (et bien sûr, on fait les mêmes avec hourly, weekly et plus si affinité).
Je mets ça dans le wiki ? (seul problème, ça marche pas avec une target)

Re: [timer] solution (élégante ?) au problème des timers

Publié : mar. 02 sept. 2014, 09:02
par benjarobin
Pourquoi avoir enlevé le lien vers la discussion : https://wiki.archlinux.org/index.php/Ta ... ctionality
Surtout que tu as eu une réponse à ta question
That is definitely nicer than the old unified timer example! However it still has the problem of all services using this timer starting simultaneously, which I think was the main complaint originally. Though based on the discussion about AccuracySec being random per-host (and thus useless for timer jitter), we still have no better solution than just per-service timers with manually staggered triggers. Silverhammermba (talk) 22:47, 1 September 2014 (UTC)