EV::Cron - Add crontab watcher into EV
version 0.123600
use 5.010; use EV; use EV::Cron; my @watchers; push @watchers, EV::cron '* * * * *', sub { say 'Every minute.'; }; push @watchers, EV::cron '5 0 * * *', sub { say 'Five minutes after midnight, every day.'; }; push @watchers, EV::cron_ns '15 14 1 * *', sub { say 'At 2:15pm on the first of every month.'; }; EV::run;
This module extends EV by adding an easy way to specify event schedules using a crontab line format.
Calls the callback when the event schedules using a crontab line format occurs.
$cronspec - SCALAR - The string in crontab line format crontab(5).
$cronspec
$callback - CODEREF - The callback.
$callback
The newly created watcher.
The cron_ns variant doesn't start (activate) the newly created watcher.
cron_ns
EV
Loïc TROCHET <losyme@cpan.org>
This software is copyright (c) 2012 by Loïc TROCHET.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install EV::Cron, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EV::Cron
CPAN shell
perl -MCPAN -e shell install EV::Cron
For more information on module installation, please visit the detailed CPAN module installation guide.