Skip Menu |

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

Report information
The Basics
Id: 83337
Status: resolved
Priority: 0/
Queue: Schedule-Cron

People
Owner: Nobody in particular
Requestors: stefanos [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.01_3
Fixed in: (no value)



Subject: No dispatching sub provided at Cron.pm line 362
Error message: No dispatching sub provided at C:/Perl/site/lib/Schedule/Cron.pm line 362. use Schedule::Cron; #my $cron = new Schedule::Cron(sub {});#work my $cron = new Schedule::Cron();#not work my $entry = '0 15 * * 4'; print scalar(localtime($cron->get_next_execution_time($entry))); i only need the function get_next_execution_time
On Fri Feb 15 04:58:10 2013, STEFANOS wrote:
Show quoted text
> Error message:
> No dispatching sub provided at C:/Perl/site/lib/Schedule/Cron.pm line 362.
>
> use Schedule::Cron;
> #my $cron = new Schedule::Cron(sub {});#work
> my $cron = new Schedule::Cron();#not work
> my $entry = '0 15 * * 4';
> print scalar(localtime($cron->get_next_execution_time($entry)));
>
> i only need the function get_next_execution_time

You dont neeed an object here, you can simply try

use Schedule::Cron;
my $entry = '0 15 * * 4';
print scalar(localtime(Schedule::Cron->get_next_execution_time($entry)));
 
No change required since there is a simple usage as static method for using get_extraction_time.