Skip to content

limen/php-jobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jobs helps to organize jobs easily.

Build Status Packagist

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

see examples tests

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/