aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/herd.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-11 23:40:57 +0200
committerLudovic Courtès <ludo@gnu.org>2018-07-13 00:08:55 +0200
commit147c5aa5d4e3bd21ee4c4cae70dff8da0bcf94b7 (patch)
tree8eaf1324699fdfd0e95f1545710258b77cb7a9d5 /gnu/services/herd.scm
parent701383081a9814d21823d42978ae23ee654e0427 (diff)
downloadguix-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.scm3
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 ...)))