Skip Menu |

This queue is for tickets about the Algorithm-Cron CPAN distribution.

Report information
The Basics
Id: 125060
Status: new
Priority: 0/
Queue: Algorithm-Cron

People
Owner: Nobody in particular
Requestors: me [...] mikeely.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: next_time hangs on impossible date (such as 31Feb)
Date: Mon, 9 Apr 2018 16:29:36 -0700
To: bug-Algorithm-Cron [...] rt.cpan.org
From: Mike Ely <me [...] mikeely.org>
Test case: my $now = time; my $ln = "* * 31 2 *"; my $cron = Algorithm::Cron->new( base => 'local', crontab => "$ln" ); my $nextrun = $cron->next_time( $now ); Executing this spins exactly one CPU at 100% and strace repeats with: stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
Subject: Re: [rt.cpan.org #125060] AutoReply: next_time hangs on impossible date (such as 31Feb)
Date: Wed, 11 Apr 2018 15:49:55 -0700
To: bug-Algorithm-Cron [...] rt.cpan.org
From: Mike Ely <me [...] mikeely.org>
Proposed patch attached. It's kind of a workaround as opposed to catching the error coming from POSIX but it is sufficient for my purposes.

Message body is not shown because sender requested not to inline it.