limen/php-jobs

A package who helps to organize jobs easily

v1.0.2 2018-05-10 02:21 UTC

This package is not auto-updated.

Last update: 2024-12-18 09:39:21 UTC


README

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/