guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 05/05: doc: Improve timer example.


From: Ludovic Courtès
Subject: [shepherd] 05/05: doc: Improve timer example.
Date: Thu, 28 Mar 2024 15:39:08 -0400 (EDT)

civodul pushed a commit to branch devel
in repository shepherd.

commit 74599fa5a58dcfc6a18899b78906f3e6414e19ac
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Mar 28 20:38:14 2024 +0100

    doc: Improve timer example.
    
    * doc/shepherd.texi (Service Examples): Tweak.
---
 doc/shepherd.texi | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/shepherd.texi b/doc/shepherd.texi
index e911165..4a07300 100644
--- a/doc/shepherd.texi
+++ b/doc/shepherd.texi
@@ -1793,10 +1793,10 @@ client connections.
 @anchor{timer-example}
 @cindex timer, example
 Let's now look at @dfn{timers}---services that run periodically, on
-chosen calendar events.  If you ever used the systemd timers or the
-venerable cron, this is similar.  The example below defines a timer that
-fires everyday at noon and runs the @command{updatedb} command as root
-(@pxref{Invoking updatedb,,, find, Finding Files}):
+chosen calendar events (@pxref{Timers}).  If you ever used systemd
+timers or the venerable cron, this is similar.  The example below
+defines a timer that fires twice a day and runs the @command{updatedb}
+command as root (@pxref{Invoking updatedb,,, find, Finding Files}):
 
 @lisp
 ;; Import the module for 'make-timer-constructor' & co.
@@ -1806,7 +1806,8 @@ fires everyday at noon and runs the @command{updatedb} 
command as root
   (service
     '(updatedb)
     #:start (make-timer-constructor
-              (calendar-event #:hours '(12) #:minutes (0))
+              ;; Fire at midnight and noon everyday.
+              (calendar-event #:hours '(0 12) #:minutes (0))
               (command '("/usr/bin/updatedb"
                          "--prunepaths=/tmp")))
     #:stop (make-timer-destructor)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]