AnyEvent-DateTime-Cron

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    However, if your callback is running asynchronously (and it really
    should), then you can block the cron loop from responding to a "stop()"
    request until your job has completed:

        sub {
            my $cv = shift;
            $cv->begin;
            do_something_asynchronous( cb => sub { $cv->end })
        }

    Callbacks are called inside an "eval" so if they throw an error, they
    will warn, but won't cause the cron loop to exit.

AUTHORS
    *   Clinton Gormley <drtech@cpan.org>

    *   Andy Gorman <agorman@cpan.org>

COPYRIGHT AND LICENSE
    This software is copyright (c) 2013 by Clinton Gormley.

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

However, if your callback is running asynchronously (and it really should),
then you can block the cron loop from responding to a L</"stop()"> request
until your job has completed:

    sub {
        my $cv = shift;
        $cv->begin;
        do_something_asynchronous( cb => sub { $cv->end })
    }

Callbacks are called inside an C<eval> so if they throw an error, they
will warn, but won't cause the cron loop to exit.

=head1 AUTHORS

=over 4

=item *

Clinton Gormley <drtech@cpan.org>



( run in 0.292 second using v1.01-cache-2.11-cpan-496ff517765 )