PHPackages                             cakejob/php-resque-ex - 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. cakejob/php-resque-ex

ActiveLibrary[Caching](/categories/caching)

cakejob/php-resque-ex
=====================

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

1.1.2(3y ago)03.7k↑37.5%2MITPHPPHP &gt;=7.3

Since Jun 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cakejob/php-resque-ex)[ Packagist](https://packagist.org/packages/cakejob/php-resque-ex)[ Docs](https://github.com/cakejob/php-resque-ex/)[ RSS](/packages/cakejob-php-resque-ex/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (4)Used By (2)

Php-Resque-ex: Resque for PHP [![Build Status](https://camo.githubusercontent.com/bb8fd7adc89e044ce5ede1700e2f29ad8deff27f2b299af763ec8214ec329a26/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6b616d6973616d612f7068702d7265737175652d65782e706e67)](http://travis-ci.org/kamisama/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.

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/kamisama/Fresque) for usage.

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

[](#installation)

Clone the git repo

```
$ git clone https://github.com/cakejob/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

```

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 7.3+
- Redis 2.2+

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

[](#contributors)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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 ~21 days

Total

3

Last Release

1377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3d590d373a2f08245849cdf9a94f32be0c557a421f0af6640b9d3c618c28886?d=identicon)[cakejob](/maintainers/cakejob)

---

Tags

phpredisqueuejobbackgroundresque

### Embed Badge

![Health badge](/badges/cakejob-php-resque-ex/health.svg)

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

###  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)
