PHPackages                             ericsnguyen/php-resque-schedule - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. ericsnguyen/php-resque-schedule

ActiveLibrary[Caching](/categories/caching)

ericsnguyen/php-resque-schedule
===============================

Redis backed library for creating background jobs and processing them later. PHP port based on resque for Ruby.

1.3.0(11y ago)0125MITPHPPHP &gt;=5.3.0

Since Aug 21Pushed 4y agoCompare

[ Source](https://github.com/thicongtu2/php-resque-ex)[ Packagist](https://packagist.org/packages/ericsnguyen/php-resque-schedule)[ Docs](http://www.github.com/kamisama/php-resque-ex/)[ RSS](/packages/ericsnguyen-php-resque-schedule/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (27)Used By (0)

Php-Resque-ex: Resque for PHP [![Build Status](https://camo.githubusercontent.com/e63a470baf8115b8e03df22ba105ce377db8cc82ff354d9884b1c62b460cdf46/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7761307836652f7068702d7265737175652d65782e706e67)](http://travis-ci.org/wa0x6e/php-resque-ex)
==========================================================================================================================================================================================================================================================================================================

[](#php-resque-ex-resque-for-php-)

Resque is a Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later.

Note
----

[](#note)

cause of some bug not easy to fix, i change some code of this library then push to packaegist to use on my project.

1. I don't have php-redis, and Redisent is not work
2. I want to change the format of datetime, cause of my dashboard can not read this dateformat

Background
----------

[](#background)

Php-Resque-Ex is a fork of [php-resque](https://github.com/chrisboulton/php-resque) by chrisboulton. See the [original README](https://github.com/chrisboulton/php-resque/blob/master/README.md) for more informations.

Additional features
-------------------

[](#additional-features)

This fork provides some additional features :

### Support of php-redis

[](#support-of-php-redis)

Autodetect and use [phpredis](https://github.com/nicolasff/phpredis) to connect to Redis if available. Redisent is used as fallback.

### Powerfull logging

[](#powerfull-logging)

Instead of piping STDOUT output to a file, you can log directly to a database, or send them elsewhere via a socket. We use [Monolog](https://github.com/Seldaek/monolog) to manage all the logging. See their documentation to see all the available handlers.

Log infos are augmented with more informations, and associated with a workers, a queue, and a job ID if any.

### Job creation delegation

[](#job-creation-delegation)

If Resque\_Job\_Creator class exists and is found by Resque, all jobs creation will be delegated to this class.

The best way to inject this class is to include it in you `APP_INCLUDE` file.

Class content is :

```
class Resque_Job_Creator
{
	public static function createJob($className, $args) {

		// $className is you job class name, the second arguments when enqueuing a job
		// $args are the arguments passed to your jobs

		// Instanciate your class, and return the instance

		return new $className();
	}
}
```

This is pretty useful when your autoloader can not load the class, like when classname doesn't match its filename. Some framework, like CakePHP, uses `PluginName.ClassName` convention for classname, and require special handling before loading.

### Failed jobs logs

[](#failed-jobs-logs)

You can easily retrieve logs for a failed jobs in the redis database, their keys are named after their job ID. Each failed log will expire after 2 weeks to save space.

### Command Line tool

[](#command-line-tool)

Fresque is shipped by default to manage your workers. See [Fresque Documentation](https://github.com/wa0x6e/Fresque) for usage.

Installation
------------

[](#installation)

Clone the git repo

```
$ git clone git://github.com/kamisama/php-resque-ex.git

```

`cd` into the folder you just cloned

```
$ cd ./php-resque-ex

```

Download Composer

```
$ curl -s https://getcomposer.org/installer | php

```

Install dependencies

```
$ php composer.phar install

```

#### Warning

[](#warning)

php-resque requires the pcntl php extension, not available on Windows platform. Composer installation will fail if you're trying to install this package on Windows machine. If you still want to continue with the installation at your own risk, execute the composer install command with the `--ignore-platform-reqs` option.

Usage
-----

[](#usage)

### Logging

[](#logging)

Use the same way as the original port, with additional ENV :

- `LOGHANDLER` : Specify the handler to use for logging (File, MongoDB, Socket, etc …). See [Monolog](https://github.com/Seldaek/monolog#handlers) doc for all available handlers. `LOGHANDLER` is the name of the handler, without the "Handler" part. To use CubeHandler, just type "Cube".
- `LOGHANDLERTARGET` : Information used by the handler to connect to the database. Depends on the type of loghandler. If it's the *RotatingFileHandler*, the target will be the filename. If it's CubeHandler, target will be a udp address. Refer to each Handler to see what type of argument their `__construct()` method requires.
- `LOGGING` : This environment variable must be set in order to enable logging via Monolog. i.e `LOGGING=1`

If one of these two environement variable is missing, it will default to *RotatingFile* Handler.

### Redis backend

[](#redis-backend)

- `REDIS_BACKEND` : hostname of your Redis database
- `REDIS_DATABASE` : To select another redis database (default 0)
- `REDIS_NAMESPACE` : To set a different namespace for the keys (default to *resque*)
- `REDIS_PASSWORD` : If your Redis backend needs authentication

Requirements
------------

[](#requirements)

- PHP 5.3+
- Redis 2.2+

Contributors
------------

[](#contributors)

- [chrisboulton](https://github.com/chrisboulton/php-resque) for the original port
- wa0x6e

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 64.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~163 days

Total

25

Last Release

4118d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2dcf63ef46261a94307b7e2b87fb2d2973ee4bc7f6e5705dd0f7fd5f5ddf9b9d?d=identicon)[ericsnguyen](/maintainers/ericsnguyen)

---

Top Contributors

[![wa0x6e](https://avatars.githubusercontent.com/u/495709?v=4)](https://github.com/wa0x6e "wa0x6e (107 commits)")[![chrisboulton](https://avatars.githubusercontent.com/u/98472?v=4)](https://github.com/chrisboulton "chrisboulton (10 commits)")[![mfauveau](https://avatars.githubusercontent.com/u/32339?v=4)](https://github.com/mfauveau "mfauveau (8 commits)")[![hoomanna](https://avatars.githubusercontent.com/u/5413073?v=4)](https://github.com/hoomanna "hoomanna (7 commits)")[![hobodave](https://avatars.githubusercontent.com/u/12404?v=4)](https://github.com/hobodave "hobodave (4 commits)")[![u2762981120](https://avatars.githubusercontent.com/u/62547503?v=4)](https://github.com/u2762981120 "u2762981120 (3 commits)")[![kevburnsjr](https://avatars.githubusercontent.com/u/20638?v=4)](https://github.com/kevburnsjr "kevburnsjr (3 commits)")[![warezthebeef](https://avatars.githubusercontent.com/u/521746?v=4)](https://github.com/warezthebeef "warezthebeef (2 commits)")[![maetl](https://avatars.githubusercontent.com/u/24809?v=4)](https://github.com/maetl "maetl (2 commits)")[![patrickbajao](https://avatars.githubusercontent.com/u/383183?v=4)](https://github.com/patrickbajao "patrickbajao (2 commits)")[![pedroarnal](https://avatars.githubusercontent.com/u/860007?v=4)](https://github.com/pedroarnal "pedroarnal (2 commits)")[![ebernhardson](https://avatars.githubusercontent.com/u/558434?v=4)](https://github.com/ebernhardson "ebernhardson (2 commits)")[![salimane](https://avatars.githubusercontent.com/u/403938?v=4)](https://github.com/salimane "salimane (1 commits)")[![scragg0x](https://avatars.githubusercontent.com/u/222611?v=4)](https://github.com/scragg0x "scragg0x (1 commits)")[![jjfrey](https://avatars.githubusercontent.com/u/799117?v=4)](https://github.com/jjfrey "jjfrey (1 commits)")[![arbet](https://avatars.githubusercontent.com/u/1234119?v=4)](https://github.com/arbet "arbet (1 commits)")[![bpdeployer](https://avatars.githubusercontent.com/u/19269451?v=4)](https://github.com/bpdeployer "bpdeployer (1 commits)")[![brendo](https://avatars.githubusercontent.com/u/69268?v=4)](https://github.com/brendo "brendo (1 commits)")[![d11wtq](https://avatars.githubusercontent.com/u/37948?v=4)](https://github.com/d11wtq "d11wtq (1 commits)")[![danielsmithsd](https://avatars.githubusercontent.com/u/7386446?v=4)](https://github.com/danielsmithsd "danielsmithsd (1 commits)")

---

Tags

phpredisqueuejobbackgroundresque

### Embed Badge

![Health badge](/badges/ericsnguyen-php-resque-schedule/health.svg)

```
[![Health](https://phpackages.com/badges/ericsnguyen-php-resque-schedule/health.svg)](https://phpackages.com/packages/ericsnguyen-php-resque-schedule)
```

###  Alternatives

[mjphaynes/php-resque

Redis backed library for creating background jobs and processing them later.

228199.3k2](/packages/mjphaynes-php-resque)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
