View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Graham Knop > AnyEvent-Timer-Cron-0.002000 > AnyEvent::Timer::Cron

Download:
AnyEvent-Timer-Cron-0.002000.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.002000   Source  

NAME ^

AnyEvent::Timer::Cron - cron based timers for AnyEvent

SYNOPSIS ^

    use AnyEvent;
    use AnyEvent::Timer::Cron;

    my $w; $w = AnyEvent::Timer::Cron->new(cron => '0 1 * * *', cb => sub {
        undef $w;
        ...
    });
    AnyEvent->condvar->recv;

DESCRIPTION ^

This module creates timers based on cron rules.

This module primarily exists to replace similar that try to do too much work, instead providing the simplest implementation, and using AnyEvent's standard conventions for timer lifetime.

METHODS ^

new( cron => $cron, cb => sub {} )

Creates a new cron timer. The callback will be called continually according to the cron rules until the object is destroyed.

cron

Required. A cron rule, either in string form or as a DateTime::Event::Cron, DateTime::Event::Cron::Quartz, or DateTime::Set object.

cb

Required. The callback to call for the cron events.

time_zone

A cron rule will be calculated under the specified time zone. If not specified, events will be calculated using UTC.

SEE ALSO ^

AnyEvent::Cron
AnyEvent::DateTime::Cron

AUTHOR ^

haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>

CONTRIBUTORS

keedi - Keedi Kim (cpan:KEEDI) <keedi@cpan.org>

COPYRIGHT ^

Copyright (c) 2013 the AnyEvent::Timer::Cron "AUTHOR" and "CONTRIBUTORS" as listed above.

LICENSE ^

This library is free software and may be distributed under the same terms as perl itself.

syntax highlighting: