Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Perl module - Add crontab watcher into EV

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 Changes
Octocat-spinner-32 README.mkdn
Octocat-spinner-32 dist.ini
README.mkdn

NAME

EV::Cron - Add crontab watcher into EV

VERSION

version 0.123600

SYNOPSIS

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;

DESCRIPTION

This module extends EV by adding an easy way to specify event schedules using a crontab line format.

METHODS

cron($cronspec, $callback)

Calls the callback when the event schedules using a crontab line format occurs.

  • Parameters

    $cronspec - SCALAR - The string in crontab line format crontab(5).

    $callback - CODEREF - The callback.

  • Return value

    The newly created watcher.

cron_ns($cronspec, $callback)

The cron_ns variant doesn't start (activate) the newly created watcher.

SEE ALSO

EV

AUTHOR

Loïc TROCHET losyme@cpan.org

COPYRIGHT AND LICENSE

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.

Something went wrong with that request. Please try again.