Subject: Re: [bug#38429] [PATCH] Add scron service.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 02 Dec 2019 10:01:56 +0100

Hello!

Robert Vollmert <[email-masked]> skribis:

> It's a simple replacement for the mcron service.
>
> If you have a mcron job definition like
>
> (define cron-job
>   #~(job "*/15 * * * *" #$(program-file ...)))
>
> you can convert it into the valid scron job
>
> (define cron-job
>   (scron-job (schedule "/15 * * * *")
>              (program-file ...)))

Nice.

> +(define scron-service-type
> +  (service-type (name 'scron)
> +                (extensions
> +                 (list (service-extension shepherd-root-service-type
> +                                          scron-shepherd-services)))
> +                (compose concatenate)
> +                (extend (lambda (config jobs)
> +                          (scron-configuration
> +                           (inherit config)
> +                           (jobs (append (scron-configuration-jobs config)
> +                                         jobs)))))
> +                (default-value (scron-configuration))))

Could you add a ‘description’ field with a short blurb (you can use
Texinfo markup)?

Also, could you add it to guix.texi, presumably under “Scheduled Job
Execution”?

Last, it would be great if you could add a test, similar to the mcron
test that’s in (gnu tests base).

Thanks in advance!

Ludo’.