AnyEvent::Timer::Cron - cron based timers for AnyEvent
use AnyEvent; use AnyEvent::Timer::Cron; my $w; $w = AnyEvent::Timer::Cron->new(cron => '0 1 * * *', cb => sub { undef $w; ... }); AnyEvent->condvar->recv;
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.
Creates a new cron timer. The callback will be called continually according to the cron rules until the object is destroyed.
Required. A cron rule, either in string form or as a DateTime::Event::Cron, DateTime::Event::Cron::Quartz, or DateTime::Set object.
Required. The callback to call for the cron events.
A cron rule will be calculated under the specified time zone. If not specified, events will be calculated using UTC.
haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>
keedi - Keedi Kim (cpan:KEEDI) <keedi@cpan.org>
Copyright (c) 2013 the AnyEvent::Timer::Cron "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software and may be distributed under the same terms as perl itself.
To install AnyEvent::Timer::Cron, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Timer::Cron
CPAN shell
perl -MCPAN -e shell install AnyEvent::Timer::Cron
For more information on module installation, please visit the detailed CPAN module installation guide.