GNU bug report logs -
#38429
[PATCH] Add scron service.
Previous Next
Reported by: Robert Vollmert <rob <at> vllmrt.net>
Date: Fri, 29 Nov 2019 17:56:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello!
Robert Vollmert <rob <at> vllmrt.net> 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’.
This bug report was last modified 5 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.