AnyEvent-Cron

 view release on metacpan or  search on metacpan

lib/AnyEvent/Cron.pm  view on Meta::CPAN

use DateTime::Event::Cron;
use v5.12;

our $VERSION = '0.03';


# map of expiration formats to their respective time in seconds
my %_Expiration_Units = ( map(($_,             1), qw(s second seconds sec)),
                          map(($_,            60), qw(m minute minutes min)),
                          map(($_,         60*60), qw(h hour hours)),
                          map(($_,      60*60*24), qw(d day days)),
                          map(($_,    60*60*24*7), qw(w week weeks)),
                          map(($_,   60*60*24*30), qw(M month months)),
                          map(($_,  60*60*24*365), qw(y year years)) );

has interval => 
    ( is => 'rw' , isa => 'Int' , default => sub { 1 } );

has verbose => 
    ( is => 'rw' , isa => 'Bool' , default => sub { 0 } );

has debug =>
    ( is => 'rw' , isa => 'Bool' , default => sub { 0 } );



( run in 1.253 second using v1.01-cache-2.11-cpan-7add2cbd662 )