limen / php-jobs
A package who helps to organize jobs easily
v1.0.2
2018-05-10 02:21 UTC
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is not auto-updated.
Last update: 2024-11-06 09:08:02 UTC
README
Features
- jobs are packed into jobset
- jobs can be executed orderly or not orderly or combined
- job's execution time is settable
- job would be retried after failed until reached the max retry count
- the max retry count is adjustable
- job's next execution time is settable
- job can be asynchronous (execute and wait feedback)
Installation
Recommend to install via composer.
composer require "limen/php-jobs"
Usage
Objects
Jobset
A jobset is consist of one or more jobs.
The jobs can be executed orderly or not orderly or combined.
Job
Job has execution time, so you can decide when the job should be executed.
If a job failed, its tried count would increase by 1 and its next execution time is up to you.
The max retry count is also up to you.
If the tried count reached the max retry count, the job would be marked as "failed".
Want to use in Laravel?
see laravel-jobs
Development
Test
$ phpunit --bootstrap tests/bootstrap.php tests/