all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: help-guix@gnu.org
Subject: How to add the timer-trigger-action to a shepherd service?
Date: Mon, 16 Dec 2024 23:53:57 +0100	[thread overview]
Message-ID: <87cyhrb5oa.fsf@wolfsden.cz> (raw)

[-- 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 --]

             reply	other threads:[~2024-12-16 22:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16 22:53 Tomas Volf [this message]
2024-12-16 23:36 ` How to add the timer-trigger-action to a shepherd service? Felix Lechner via
2024-12-16 23:43 ` Jake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyhrb5oa.fsf@wolfsden.cz \
    --to=~@wolfsden.cz \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.