unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to add the timer-trigger-action to a shepherd service?
@ 2024-12-16 22:53 Tomas Volf
  2024-12-16 23:36 ` Felix Lechner via
  2024-12-16 23:43 ` Jake
  0 siblings, 2 replies; 5+ messages in thread
From: Tomas Volf @ 2024-12-16 22:53 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]


Hello,

I am trying to use the new shepherd timers in my guix configuration.  I
got it working with some help on IRC, except I cannot figure out how to
configure the extra action.  Shepherd's manual gives this example:

--8<---------------cut here---------------start------------->8---
     (define updatedb
       (service
         '(updatedb)
         #:start (make-timer-constructor
                   ;; Fire at midnight and noon everyday.
                   (calendar-event #:hours '(0 12) #:minutes (0))
                   (command '("/usr/bin/updatedb"
                              "--prunepaths=/tmp")))
         #:stop (make-timer-destructor)
         #:actions (list timer-trigger-action)))
--8<---------------cut here---------------end--------------->8---

However I cannot figure out what to put into the (actions) field of the
shepherd-service record.  Documentation says it should be instance of
shepherd-action, however I have no idea how to turn the
timer-trigger-action into it.  Any suggestions?

Thanks,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-18 14:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 22:53 How to add the timer-trigger-action to a shepherd service? Tomas Volf
2024-12-16 23:36 ` Felix Lechner via
2024-12-18 14:05   ` Tomas Volf
2024-12-16 23:43 ` Jake
2024-12-18 14:06   ` Tomas Volf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).