Bug#818698: does not convert crontabs correctly

Michael Meskes meskes at debian.org
Sun Mar 20 11:44:42 GMT 2016


On Sat, Mar 19, 2016 at 09:29:21PM +0100, Alexandre Detiste wrote:
> Have a look at the generated files under /run/systemd/generator/cron-*.timer + cron-*.service
> to have a proper comparaison basis.

Here we go.

timer:

[Unit]
Description=[Timer] "14,44 * * * * foo"
Documentation=man:systemd-crontab-generator(8)
PartOf=cron.target
RefuseManualStart=true
RefuseManualStop=true
SourcePath=/var/spool/cron/crontabs/michael

[Timer]
Unit=cron-michael-michael-1.service
OnCalendar=*-*-* *:14,44:00

service:
[Unit]
Description=[Cron] "14,44 * * * * foo"
Documentation=man:systemd-crontab-generator(8)
RefuseManualStart=true
RefuseManualStop=true
SourcePath=/var/spool/cron/crontabs/michael
OnFailure=cron-failure@%i.service
Requires=systemd-user-sessions.service
RequiresMountsFor=/home/michael

[Service]
Type=oneshot
IgnoreSIGPIPE=false
ExecStart=foo
User=michael

> 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.

Sure.

> > 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 ?

Does it work for you?

If you want me to try, it'd help if you could send me exactly what to do. 

> > 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.

I completely and strongly disagree. Did you see my follow-up email, it *never*
executed my foo job. It may be only serious, but it definitely is not fit for a
release. Keep in mind that it provides and replaces cron, but is not working as
such, up to the point of being competely dysfunctional. Yes, I may be doing
something wrong, but currently I have to remove the package and install cron
again to get my system to perform normally again.


> 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.

I do not need any custom stuff or enterprisey stuff, whatever that is in this
context. I just want the package to do, what it claims it does. 

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL




More information about the Pkg-systemd-maintainers mailing list