From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sM1mEWG7YGfg+gAAe85BDQ:P1 (envelope-from ) for ; Mon, 16 Dec 2024 23:44:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sM1mEWG7YGfg+gAAe85BDQ (envelope-from ) for ; Tue, 17 Dec 2024 00:44:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=P9Is23aL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734392670; a=rsa-sha256; cv=none; b=qfH8XsoGhW9xrfSxg+ZJsBKLTEt6Jq5OWLD7RoJAuFDOO7K9vEDu5lm911Q7Hwn7IbgCBm 1NDfO05F+mk39uleiwh/x0P8w0Gpt3xp2axRi5dZrPiiIJP131xbgbdJiAsAjrz83NIgPJ uL7VqFFtSs9Fyd6pccdAYQ3Ke/ImCjo5kKVlcj1iw6GlKqOrl4Wt4HNb7ZVTL9lqh3mCB9 mPfatQOsoruv6oGcY83xjg/KJXZC7DiQ4PhNMQMwkrSpbhBllSK305m5vGjSrRTHb8C6If T7fR99No51rcnla2hnjYaoIuWOISOcugctpte9l8yxtseNRJoU7VZDdd0Bennw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=P9Is23aL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734392670; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=U4TLkPfLIQtC4tvoejjbhOK0X832MNj/D3Tbk+I1bhg=; b=lmPWV5sxG3feu9lGsdX7ZR8EUMG9Hglxt4cUUNT0egwyshV7G8AdX8OsLpu+u9n75wDwm4 2kRYZOylWdO8mB2O9PTaDaRRswMrr1P6AmvhJb/EfFi/kk2IIf5dOP4sIRzLjtAdDtAzTm VjLaxQon7+zrFbjxTrrIOsO2Skk7kL/IO2qWA5lvSLOMIrdn3fNXPsCMS7O9M8vqU8wwvm q0SA1bQqEiSDPY8pOVc9XZLwLIUuQKiaAGy/3R/XQiwhizHvEqKEG19L9QKrs3HMlAcaCC qs7W1cM8UPqIOGmIggdR/Xpb4W7FSD4tyNiQP46cV9ChG9SqIfrFN3nQpi8CKQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2FF2D1FE00 for ; Tue, 17 Dec 2024 00:44:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNKkj-0006lI-W4; Mon, 16 Dec 2024 18:43:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNKke-0006ky-JV for help-guix@gnu.org; Mon, 16 Dec 2024 18:43:50 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNKkX-0001Ca-Ay for help-guix@gnu.org; Mon, 16 Dec 2024 18:43:47 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-386329da1d9so2190708f8f.1 for ; Mon, 16 Dec 2024 15:43:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734392618; x=1734997418; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=8mP5GrMazlXmTFrqVjoM5C39hxEb9e6YAbz29tMU9HM=; b=P9Is23aLYVhoX/lTPqOgYVLkn4pO21/WV3V2D8jJPcT8B43v3WljzG04/Nv1lgKHQ/ 4f+C067k29LW//smFyoQAT7+H3gLpEU11B4hzNgZnR5fWlZHsciBWWvm0tG9jShNcrkS IFEMExNQGbR9ZkGF02dyLe5nxo1dPrLrTwd6lNTNEp6pCI3iLO9Yf1FdeisYiwnRBw6G Y9sEwipVQJmovDEu6CfQsEBAgxjkcyNRhx/H6MftwEXzHOXGR1RJ1q3mZldoTaQ/0gzr UmSh3xj8yWesAIDynOOMAGyDdI4h7n3Iz/2SRrLMVbfZmt3+awP3kWW0bXg4Eu50dU0+ g/NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734392618; x=1734997418; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8mP5GrMazlXmTFrqVjoM5C39hxEb9e6YAbz29tMU9HM=; b=lIao4yO05GrRtMHoKpnNYapic6boae8kI8X+PrgdJ0dRN294wZ4SQQ2gm3uPywMojb WEswVI10FCAXHK4kS5ry3FJDRC58afk8fDwt/Q1H4YWLhegtZGaz9ULG0zQuyOUlgmMv feAwWo93QIE/C4rimk1nwCqgQwLKm29+B/iQsdkVzQQHFRe/IvjcKYtfeVy2nw43xrQ5 4W8WwLfvTxLCDi2nJv9zjNfwNx0ygz0SmDVVeejTKgx2M7MAE2d+2FnQJweTpXRMuUZT ui8mr4HaiTKDuWUY3IDal/uPD4lY8c+4j9GSGQw//5JKpTruFEJlT8Mu/zCBkTPvsM+r iufA== X-Gm-Message-State: AOJu0Yxc1+nh1ya8EOQRyyOw/VCbzp0wrYxXlF4jYUVLWivxfqZoLjtU /1u2FUeF1UdXbPwROWY8EsqGdi1Z9fz+1dah8vi01nhRrPCotkuY//S/vmTd38z28/PiwGGECqw IHVevC0EChMweq7JamUGfjLFxywX1BTxF X-Gm-Gg: ASbGncvvRFPljbPtchFWzEZwKyrZFbzddVYQG+SYpr+CMUxtEPe9xExajYRuyUygm6i 4IGK5EFZZV/9mItwevYcfQ9ZbAV8EDrLIPza2KQ== X-Google-Smtp-Source: AGHT+IFbe9QBgN6z1C0XS6d5Nv5dMMTv4W7m6zDEukMMC13Xu0iPvGBb1YOo5E53450VpFOnrFP0uugvY/i0dhZsy+s= X-Received: by 2002:a05:6000:144c:b0:385:f3fb:46aa with SMTP id ffacd0b85a97d-3888e0b8b3amr11077636f8f.43.1734392618347; Mon, 16 Dec 2024 15:43:38 -0800 (PST) MIME-Version: 1.0 References: <87cyhrb5oa.fsf@wolfsden.cz> In-Reply-To: <87cyhrb5oa.fsf@wolfsden.cz> From: Jake Date: Mon, 16 Dec 2024 23:43:27 +0000 Message-ID: Subject: Re: How to add the timer-trigger-action to a shepherd service? To: help-guix@gnu.org Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=jforst.mailman@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam: Yes X-Spam: Yes X-Spam-Score: 8.79 X-Migadu-Queue-Id: 2FF2D1FE00 X-Migadu-Spam-Score: 8.79 X-Migadu-Scanner: mx10.migadu.com X-TUID: iy9FFpeikia/ 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=E2=80=AFPM 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=3D/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. >