Popularity
1.8
Growing
Activity
0.0
Stable
61
4
5

Description

A few classes to help you executing complicated tasks (like sending mails) later.

Code Quality Rank: L5
Programming language: PHP
License: MIT License
Tags: Miscellaneous    
Latest version: v0.8.0

Procrastinator alternatives and similar libraries

Based on the "Miscellaneous" category.
Alternatively, view Procrastinator alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Procrastinator or a related project?

Add another 'Miscellaneous' Library

README

Procrastinator for PHP: do stuff later

Gitter Build Status Dependency Status Average time to resolve an issue Percentage of issues still open

A few classes to help you executing complicated tasks (like sending mails) later.

Example using fastcgi_finish_request() to finish request before executing tasks

<?php
$procrastinator = new \Procrastinator\DeferralManager(
    new \Procrastinator\Scheduler\OnRegisterShutdownScheduler(),
    new \Procrastinator\Executor\Decorator\PhpFpmExecutorDecorator(
        new \Procrastinator\Executor\SingleThreadExecutor()
    )
);

// The rough way
$procrastinator->register(
    new \Procrastinator\Deferred\CallbackDeferred(
        'some name',
        function() {sleep(10);}
    )
);

// Or use the more convenient builder interface
$procrastinator->register(
    $procrastinator
        ->newDeferred()
        ->name('some other name')
        ->call(function() {sleep(10);}
        ->build()
);

$procrastinator->schedule();