Bug#818698: does not convert crontabs correctly

Alexandre Detiste alexandre.detiste at gmail.com
Sat Mar 19 20:29:21 GMT 2016


control: severity -1 important

> Severity: grave
> 
> I just installed systemd-cron to try it out and found that it only partly
> translated my crontabs. For instance my crontab says:
> 
> 26 * * * * foo
> 14,44   * * * * bar
> 
> However at 21:10 I got this:
> 
> michael at feivel:~$ systemctl list-timers |grep michael
> Sa 2016-03-19 21:44:00 CET   32min left          n/a                         n/a          cron-michael-michael-1.timer cron-michael-michael-1.service
> Sa 2016-03-19 22:26:00 CET   1h 14min left       n/a                         n/a          cron-michael-michael-0.timer cron-michael-michael-0.service

Have a look at the generated files under /run/systemd/generator/cron-*.timer + cron-*.service
to have a proper comparaison basis.
 
> Obviously the very first execution of each job is missing.

I can't tell without those; without knowing this, it can either be a bug in systemd-cron
that translate the crontabs or systemd that run the generated services+timers.

> Also I found that changing a crontab to have something executed in a few
> minutes always gives me a timer in 24 hours.

Maybe it's systemd that does that; can you try with native timers maybe ?

> Since this could result in data loss, depending on what the job is supposed to
> do (backup!) I think grave is correct, but your mileage may vary.

Wow, that's a big gun ! Downgrading!
"grave" would mean systemd-cron does corrupt your system,
break an other package or something, here according to you;
it just miss a first run of some backup job.

> What do I miss?

systemd-cron was thought just a stop-gap to allow crontabs to fit in a systemd-enabled os 
while retaining sysvinit+cron compatibility for Debian packages depending on "cron | cron-daemon";
if you need some custom stuff or more enterprisey stuff; natives timers are the way to go.

Greets,

Alexandre Detiste



More information about the Pkg-systemd-maintainers mailing list