GNU bug report logs - #75843
shepherd: cron-string->calendar-event does not accept "*/15 * * * *"

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Sat, 25 Jan 2025 22:10:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

To reply to this bug, email your comments to 75843 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#75843; Package guix. (Sat, 25 Jan 2025 22:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 25 Jan 2025 22:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: bug-guix <at> gnu.org
Subject: shepherd: cron-string->calendar-event does not accept "*/15 * * * *"
Date: Sat, 25 Jan 2025 23:09:00 +0100
[Message part 1 (text/plain, inline)]
Hello,

when I try to configure a timer based on my legacy crontab file, I get
the following error:

--8<---------------cut here---------------start------------->8---
$ guix shell guile shepherd guile-fibers -- guile -c '(use-modules (shepherd service timer)) (cron-string->calendar-event "*/15 * * * *")'
Backtrace:
In ice-9/boot-9.scm:
  1752:10  5 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
           4 (apply-smob/0 #<thunk 7f5d9c401300>)
In ice-9/boot-9.scm:
    724:2  3 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7f5d9c404c80>)))
In ice-9/command-line.scm:
   185:19  1 (_ #<input: string 7f5d9c3fe850>)
In unknown file:
           0 (eval (cron-string->calendar-event "*/15 * * * *") #<di…>)

ERROR: In procedure eval:
ERROR:
  1. &message: "\"*/15 * * * *\": invalid minutes cron field"
--8<---------------cut here---------------end--------------->8---

It seems to work with 0-59/15, so there possibly is some bug in handling
the *.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#75843; Package guix. (Sun, 26 Jan 2025 11:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 75843 <at> debbugs.gnu.org (full text, mbox):

From: 45mg <45mg.writes <at> gmail.com>
To: Tomas Volf <~@wolfsden.cz>, 75843 <at> debbugs.gnu.org
Subject: Re: bug#75843: shepherd: cron-string->calendar-event does not
 accept "*/15 * * * *"
Date: Sun, 26 Jan 2025 11:44:41 +0000
Tomas Volf <~@wolfsden.cz> writes:

> ERROR: In procedure eval:
> ERROR:
>   1. &message: "\"*/15 * * * *\": invalid minutes cron field"
> --8<---------------cut here---------------end--------------->8---
>
> It seems to work with 0-59/15, so there possibly is some bug in handling
> the *.

I get a similar error with `(cron-string->calendar-event "* * * * *")`
in a `shepherd-service`:

--8<---------------cut here---------------start------------->8---
$ sudo guix system reconfigure config.scm
...
guix system: warning: exception caught while executing 'eval' on service 'root':
Throw to key `%exception' with args `("#<&message message: \"calendar-event: hours: 24: value out of range (0-23)\">")'.
--8<---------------cut here---------------end--------------->8---


but '* 0-23 * * *' works.




Information forwarded to bug-guix <at> gnu.org:
bug#75843; Package guix. (Sun, 26 Jan 2025 11:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 75843 <at> debbugs.gnu.org (full text, mbox):

From: 45mg <45mg.writes <at> gmail.com>
To: 45mg <45mg.writes <at> gmail.com>, Tomas Volf <~@wolfsden.cz>,
 75843 <at> debbugs.gnu.org
Subject: Re: bug#75843: shepherd: cron-string->calendar-event does not
 accept "*/15 * * * *"
Date: Sun, 26 Jan 2025 11:52:50 +0000
45mg <45mg.writes <at> gmail.com> writes:

> I get a similar error with `(cron-string->calendar-event "* * * * *")`
[...]
> but '* 0-23 * * *' works.

Oh, nevermind, you already opened a separate bug for this:
https://issues.guix.gnu.org/75836




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 05 Feb 2025 14:28:02 GMT) Full text and rfc822 format available.

Notification sent to Tomas Volf <~@wolfsden.cz>:
bug acknowledged by developer. (Wed, 05 Feb 2025 14:28:02 GMT) Full text and rfc822 format available.

Message #16 received at 75843-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 75843-done <at> debbugs.gnu.org
Subject: Re: bug#75843: shepherd: cron-string->calendar-event does not
 accept "*/15 * * * *"
Date: Wed, 05 Feb 2025 15:27:04 +0100
Hello,

Tomas Volf <~@wolfsden.cz> skribis:

> $ guix shell guile shepherd guile-fibers -- guile -c '(use-modules (shepherd service timer)) (cron-string->calendar-event "*/15 * * * *")'

[...]

>   1. &message: "\"*/15 * * * *\": invalid minutes cron field"

Fixed in 6f3860e492e078c5579e2117b04742252be81562.

> It seems to work with 0-59/15, so there possibly is some bug in handling
> the *.

Yup, that’s a good workaround until 1.0.2 is out (presumably in the
coming days).

Thanks,
Ludo’.




This bug report was last modified 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.