[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: doc: Add a tip to better name mcron jobs.
From: |
guix-commits |
Subject: |
branch master updated: doc: Add a tip to better name mcron jobs. |
Date: |
Sun, 08 Aug 2021 01:37:13 -0400 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 392c717 doc: Add a tip to better name mcron jobs.
392c717 is described below
commit 392c7175ae247b3bcf9dfa0fe87ee151f5df0000
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Aug 8 01:28:57 2021 -0400
doc: Add a tip to better name mcron jobs.
* doc/guix.texi (Scheduled Job Execution): Specify the 'displayable'
argument
for the 'updatedb-job' example. Add a tip to better name jobs, referring to
the modified example.
---
doc/guix.texi | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index a826171..4eb5324 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15919,7 +15919,8 @@ gexps to introduce job definitions that are passed to
mcron
(lambda ()
(execl (string-append #$findutils "/bin/updatedb")
"updatedb"
- "--prunepaths=/tmp /var/tmp /gnu/store"))))
+ "--prunepaths=/tmp /var/tmp /gnu/store"))
+ "updatedb"))
(define garbage-collector-job
;; Collect garbage 5 minutes after midnight every day.
@@ -15948,6 +15949,14 @@ gexps to introduce job definitions that are passed to
mcron
%base-services)))
@end lisp
+@quotation Tip
+When providing the action of a job specification as a procedure, you
+should provide an explicit name for the job via the optional 3rd
+argument as done in the @code{updatedb-job} example above. Otherwise,
+the job would appear as ``Lambda function'' in the output of
+@command{herd schedule mcron}, which is not nearly descriptive enough!
+@end quotation
+
For more complex jobs defined in Scheme where you need control over the top
level, for instance to introduce a @code{use-modules} form, you can move your
code to a separate program using the @code{program-file} procedure of the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: doc: Add a tip to better name mcron jobs.,
guix-commits <=