mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
doc: Recommend avoiding execl, execle or execlp in mcron job specifications.
* doc/guix.texi (Scheduled Job Execution): Adjust the 'updatedb' example and add a new tip.
This commit is contained in:
parent
3cff7bfa9b
commit
3578fb1323
1 changed files with 8 additions and 3 deletions
|
@ -18940,8 +18940,7 @@ gexps to introduce job definitions that are passed to mcron
|
||||||
;; job's action as a Scheme procedure.
|
;; job's action as a Scheme procedure.
|
||||||
#~(job '(next-hour '(3))
|
#~(job '(next-hour '(3))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(execl (string-append #$findutils "/bin/updatedb")
|
(system* (string-append #$findutils "/bin/updatedb")
|
||||||
"updatedb"
|
|
||||||
"--prunepaths=/tmp /var/tmp /gnu/store"))
|
"--prunepaths=/tmp /var/tmp /gnu/store"))
|
||||||
"updatedb"))
|
"updatedb"))
|
||||||
|
|
||||||
|
@ -18980,6 +18979,12 @@ the job would appear as ``Lambda function'' in the output of
|
||||||
@command{herd schedule mcron}, which is not nearly descriptive enough!
|
@command{herd schedule mcron}, which is not nearly descriptive enough!
|
||||||
@end quotation
|
@end quotation
|
||||||
|
|
||||||
|
@quotation Tip
|
||||||
|
Avoid calling the Guile procedures @code{execl}, @code{execle} or
|
||||||
|
@code{execlp} inside a job specification, else mcron won't be able to
|
||||||
|
output the completion status of the job.
|
||||||
|
@end quotation
|
||||||
|
|
||||||
For more complex jobs defined in Scheme where you need control over the top
|
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
|
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
|
code to a separate program using the @code{program-file} procedure of the
|
||||||
|
|
Loading…
Reference in a new issue