diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-07-11 23:40:57 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-07-13 00:08:55 +0200 |
commit | 147c5aa5d4e3bd21ee4c4cae70dff8da0bcf94b7 (patch) | |
tree | 8eaf1324699fdfd0e95f1545710258b77cb7a9d5 /gnu/services/herd.scm | |
parent | 701383081a9814d21823d42978ae23ee654e0427 (diff) | |
download | guix-147c5aa5d4e3bd21ee4c4cae70dff8da0bcf94b7.tar guix-147c5aa5d4e3bd21ee4c4cae70dff8da0bcf94b7.tar.gz |
services: mcron: Add 'schedule' action.
Inspired by
<https://lists.gnu.org/archive/html/help-guix/2018-07/msg00035.html>.
* gnu/services/mcron.scm (shepherd-schedule-action): New procedure.
(mcron-shepherd-services): Add 'actions' field.
* gnu/tests/base.scm (run-mcron-test)["schedule action"]: New test.
* doc/guix.texi (Scheduled Job Execution): Mention 'herd schedule'.
Diffstat (limited to 'gnu/services/herd.scm')
-rw-r--r-- | gnu/services/herd.scm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index d882c232cf..8c96b70731 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -45,6 +45,7 @@ live-service-requirement live-service-running + with-shepherd-action current-services unload-services unload-service @@ -168,6 +169,8 @@ return #f." (define-syntax-rule (with-shepherd-action service (action args ...) result body ...) + "Invoke ACTION on SERVICE with the given ARGS, and evaluate BODY with RESULT +bound to the action's result." (invoke-action service action (list args ...) (lambda (result) body ...))) |