guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38429] [PATCH] Add scron service.


From: Ludovic Courtès
Subject: [bug#38429] [PATCH] Add scron service.
Date: Mon, 02 Dec 2019 10:01:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello!

Robert Vollmert <address@hidden> 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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]