Bug#818698: does not convert crontabs correctly

Felipe Sateler fsateler at debian.org
Mon Mar 21 11:54:21 GMT 2016


On 20 March 2016 at 08:44, Michael Meskes <meskes at debian.org> wrote:
> 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

Is this the real output from systemd-cron? Then it should be fixed:

1. Exec* need their first argument to be a full path.
2. Exec* are not executed via a shell. IIRC, crontab lines can include
shell constructs. Systemd-cron should generate units that use a shell
(eg, /bin/sh -c 'foo').


-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list