Hi Tomas
I got the snippet below from the patch series
https://issues.guix.gnu.org/74860
(actions (list (shepherd-action
(name 'trigger)
(documentation "Trigger something.")
(procedure #~trigger-timer))))
Cheers
Jake
On Mon, Dec 16, 2024 at 10:54 PM Tomas Volf <[email protected]> wrote:
>
> 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.
>