all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jake <jforst.mailman@gmail.com>
To: help-guix@gnu.org
Subject: Re: How to add the timer-trigger-action to a shepherd service?
Date: Mon, 16 Dec 2024 23:43:27 +0000	[thread overview]
Message-ID: <CAJqVjv8KK4kb7cRQxpEt68jrN1Us9T-M2YNdn9KhMSGPhvV0EQ@mail.gmail.com> (raw)
In-Reply-To: <87cyhrb5oa.fsf@wolfsden.cz>

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 <~@wolfsden.cz> 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.
>

      parent reply	other threads:[~2024-12-16 23:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-16 23:43 ` Jake [this message]

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=CAJqVjv8KK4kb7cRQxpEt68jrN1Us9T-M2YNdn9KhMSGPhvV0EQ@mail.gmail.com \
    --to=jforst.mailman@gmail.com \
    --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.