From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-devel-bounces+larch=yhetil.org@gnu.org>
Received: from mp0.migadu.com ([2001:41d0:403:58f0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms1.migadu.com with LMTPS
	id iEBxICS7MmZDvAAAqHPOHw:P1
	(envelope-from <guix-devel-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 01 May 2024 23:59:00 +0200
Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp0.migadu.com with LMTPS
	id iEBxICS7MmZDvAAAqHPOHw
	(envelope-from <guix-devel-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 01 May 2024 23:59:00 +0200
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=b+PfDLkS;
	dmarc=pass (policy=none) header.from=gnu.org;
	spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1714600740;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc: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=eDHGoj4/WkgzgGUHWDkTssgviFg/++66kyBOsMcGyBc=;
	b=YLqcO2pzPr6lTOfSoQo/Hts3s4wMRBrlrWg/ZIf6vHpkKdqwSzs/T2eV8iGmrarVNkt9CO
	aTV/7aegQ3v+viipKCXXMkN+mgXNEA5pxW2VPOxh9CCVBs8h4IAZ/EAZNJuPwkMcaKDj3A
	kZF34RuA3hDPeBKCqwBqtamNgh8l3h2xG7qFXLmwpnsVXxwe7zhLaluLG6wLisi0CNRZZo
	gnjVIPvb0OzrKU7gsv3S5JE0Qc0pHGExqEjUzFjRzpUylTzbfeIPt8cUKcJu0a1ycI4V6u
	xtOXBSgt4mH3haRPsRq7rhfla0IVBjxnnf9KEZCNbopYo9cOjINEJg48KOiKtA==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714600740; a=rsa-sha256; cv=none;
	b=QLmMWQePoFBJTm61IpoSp+FcmuV0H35Wsxo6P/dpbuBe6IeIehqQaF3W29DjVZcZbdQ6qh
	oVnjdc+uFKwtqzZlH3BDhtPd+5HszNMHeyzAsWOMj5xtGUpLULgNMsp16/Px1ZyWVEmLeI
	+HlL+Zjq2WR0I5/EQLJ/4xWsDHK1ewSD8FzNuf5y+NS4lM7cB5zJ6vWj7+47aIYMJ6Tg0h
	ZG85b09fzCm0SXfy93ObjrtuGQpTsU2dpkpSA/HvYiGBGH3OApnsY7olF/8Cf37Rzd1593
	oXGwPkl6QqVeeDpxsM4QIQu60VVCfmOipbt46hgzyCMD9e3mnnC2yRq53f5ijQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=b+PfDLkS;
	dmarc=pass (policy=none) header.from=gnu.org;
	spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"
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 6FB98C0BD
	for <larch@yhetil.org>; Wed, 01 May 2024 23:59:00 +0200 (CEST)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-devel-bounces@gnu.org>)
	id 1s2Hy8-0002Rr-Gx; Wed, 01 May 2024 17:58:28 -0400
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 <ludo@gnu.org>) id 1s2Hy1-0002QG-4s
 for guix-devel@gnu.org; Wed, 01 May 2024 17:58:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@gnu.org>)
 id 1s2Hy0-0004V4-EK; Wed, 01 May 2024 17:58:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=eDHGoj4/WkgzgGUHWDkTssgviFg/++66kyBOsMcGyBc=; b=b+PfDLkSQ/T0roNarl71
 24Dvh781A6R4piKaLnmjCwIXjf0y7bAWEYVxRGXhkp7HSEhw9EJVrvZ/RJg4a2R6Y5goztfjW12yB
 P1K7EQAI091CVLetw2wPp7rwoDlhx6UaZek+7cG+VdSsIy2rqc12xgvNcZthn63JVFFxyfGfY51YW
 SJSlOiEkoexo6N9snGiVG63hGbS2FllP43zf3YUOqf94vnBFjMIXBFRXEuTfj/G3gpuuxZjop3CEf
 P3E/3nCQfif0epYCntNQ86NKUo6krGxqMxlHvWXArq+G74AEN2CPA0DcCoZPelnlcNwmBrLs5NUMX
 HSbwmzLItCSWjA==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@gnu.org>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Shepherd timers
In-Reply-To: <87seze4d8q.fsf@lease-up.com> (Felix Lechner's message of "Sun,
 21 Apr 2024 14:28:21 -0700")
References: <87jzlrpbsr.fsf@gnu.org> <877chq3p48.fsf@lease-up.com>
 <87o7ayj8d4.fsf@gnu.org> <87frw3973e.fsf@lease-up.com>
 <87seztjmyi.fsf@gnu.org> <87plur20cc.fsf@lease-up.com>
 <878r19e7yd.fsf@gnu.org> <87seze4d8q.fsf@lease-up.com>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Tridi 13 =?utf-8?Q?Flor=C3=A9al?= an 232 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour du
 =?utf-8?Q?B=C3=A2ton-d'or?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 01 May 2024 23:58:16 +0200
Message-ID: <87o79p2o07.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: guix-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Development of GNU Guix and the GNU System distribution."
 <guix-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-devel>,
 <mailto:guix-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-devel>
List-Post: <mailto:guix-devel@gnu.org>
List-Help: <mailto:guix-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-devel>,
 <mailto:guix-devel-request@gnu.org?subject=subscribe>
Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org
Sender: guix-devel-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -8.16
X-Spam-Score: -8.16
X-Migadu-Queue-Id: 6FB98C0BD
X-Migadu-Scanner: mx11.migadu.com
X-TUID: ilP4alwQHtji

Hi!

Felix Lechner <felix.lechner@lease-up.com> skribis:

> While 'command' works and was in your initial example, I had trouble
> tracking down the documentation for it.  Is it a record entry destined
> for 'shepherd-command'?

>From the =E2=80=9CTimers=E2=80=9D section of the manual in the =E2=80=98dev=
el=E2=80=99 branch:

--8<---------------cut here---------------start------------->8---
 -- Procedure: command LINE [#:user #f] [#:group #f]
          [#:environment-variables (default-environment-variables)]
          [#:directory (default-service-directory)] [#:resource-limits
          '()]
     Return a new command for LINE, a program name and argument list, to
     be executed as USER and GROUP, with the given
     ENVIRONMENT-VARIABLES, in DIRECTORY, and with the given
     RESOURCE-LIMITS.

     These arguments are the same as for =E2=80=98fork+exec-command=E2=80=
=99 and related
     procedures (*note =E2=80=98fork+exec-command=E2=80=99: exec-command.).
--8<---------------cut here---------------end--------------->8---

> Spoiled by Guix's seamless Guile integration, I don't shell out much
> anymore.  Will 'command' accept a thunk?

No, but =E2=80=98make-timer-constructor=E2=80=99 does:

--8<---------------cut here---------------start------------->8---
 -- Procedure: make-timer-constructor EVENT ACTION
          [#:wait-for-termination?]
     Return a procedure for use as the =E2=80=98start=E2=80=99 method of a =
service.  The
     procedure will perform ACTION at every occurrence of =E2=80=98event=E2=
=80=99, a
     calendar event as returned by =E2=80=98calendar-event=E2=80=99.  ACTIO=
N may be
     either a command (returned by =E2=80=98command=E2=80=99) or a thunk; i=
n the latter
     case, the thunk must be suspendable or it could block the whole
     shepherd process.
--8<---------------cut here---------------end--------------->8---

Ludo=E2=80=99.