unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Felix Lechner <felix.lechner@lease-up.com>
Cc: Attila Lendvai <attila@lendvai.name>,  Maya <maya@zenmaya.xyz>,
	guix-devel@gnu.org
Subject: Shepherd calendar event bug
Date: Tue, 13 Aug 2024 15:46:31 +0200	[thread overview]
Message-ID: <87v804a62w.fsf_-_@gnu.org> (raw)
In-Reply-To: <87v805bbwm.fsf@lease-up.com> (Felix Lechner's message of "Mon, 12 Aug 2024 15:43:05 -0700")

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

> Okay, then there is still another problem.  I am unable to reconfigure
> my systems via 'guix deploy' when a timer is enabled already.  I am
> trying to add a second timer.

[...]

>    (start #~(make-timer-constructor
>              ;; Every first Sunday of the month at 1 AM.
>              (calendar-event #:days-of-month '(1 2 3 4 5 6 7)
>                              #:days-of-week '(sunday)
>                              #:hours '(1))

I was able to reproduce the issue with current ‘devel’:

--8<---------------cut here---------------start------------->8---
scheme@(shepherd service timer)> (next-calendar-event (calendar-event #:days-of-month '(1 2 3 4 5 6 7)
                             #:days-of-week '(sunday)
                             #:hours '(1))
						      (time-utc->date (current-time time-utc)))
ice-9/boot-9.scm:1676:22: In procedure raise-exception:
Throw to key `match-error' with args `("match" "no matching pattern" ())'.

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(shepherd service timer) [1]> ,bt
In shepherd/service/timer.scm:
    327:8  2 (next-calendar-event #<<calendar-event> seconds: (0) minutes: (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59) hours: (1) days-of-month: (1 2 3 4 5 6 7) months: (1 2 3 4 5 6 7 8 9 10 11 12) days-of-week: (0)> _)
    252:4  1 (fit-day _ _ _)
In ice-9/boot-9.scm:
  1676:22  0 (raise-exception _ #:continuable? _)
--8<---------------cut here---------------end--------------->8---

Note that this is asking for a Sunday 1st, or 2nd, etc. until 7th,
contrary to what the comment says.

It should be able to find Sunday, Sept. 1st at least.

I’ll investigate but in the meantime maybe what you want is to remove
#:days-of-month?

Ludo’.


  reply	other threads:[~2024-08-13 13:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 13:27 Debugging failing shepherd startup maya
2024-06-21 20:32 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-27 13:07 ` Ludovic Courtès
2024-06-27 17:22   ` Maya
2024-06-28 15:17     ` Reproducer for " Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-28 16:43       ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-07-02 13:03       ` Attila Lendvai
2024-07-02 13:11         ` Attila Lendvai
2024-08-12 22:43           ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-08-13 13:46             ` Ludovic Courtès [this message]
2024-08-16 19:13               ` Shepherd calendar event bug Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-08-21 17:30                 ` Ludovic Courtès
2024-08-23 16:38                   ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-09-16 13:27             ` Reproducer for failing shepherd startup Attila Lendvai
2024-09-17  1:11               ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87v804a62w.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=attila@lendvai.name \
    --cc=felix.lechner@lease-up.com \
    --cc=guix-devel@gnu.org \
    --cc=maya@zenmaya.xyz \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).