summary refs log tree commit diff
path: root/doc/guix.texi
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 /doc/guix.texi
parent701383081a9814d21823d42978ae23ee654e0427 (diff)
downloadguix-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 'doc/guix.texi')
-rw-r--r--doc/guix.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 34012a357b..eaec4c422b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10850,6 +10850,21 @@ gexps to introduce job definitions that are passed to mcron
 for more information on mcron job specifications.  Below is the
 reference of the mcron service.
 
+On a running system, you can use the @code{schedule} action of the service to
+visualize the mcron jobs that will be executed next:
+
+@example
+# herd schedule mcron
+@end example
+
+@noindent
+The example above lists the next five tasks that will be executed, but you can
+also specify the number of tasks to display:
+
+@example
+# herd schedule mcron 10
+@end example
+
 @deffn {Scheme Procedure} mcron-service @var{jobs} [#:mcron @var{mcron}]
 Return an mcron service running @var{mcron} that schedules @var{jobs}, a
 list of gexps denoting mcron job specifications.