PHPackages                             pnixx/delayed\_job - 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. pnixx/delayed\_job

ActiveLibrary[Caching](/categories/caching)

pnixx/delayed\_job
==================

Async Delayed Job for PHP

3.0.2(1y ago)03.0k↓33.3%MITPHPPHP &gt;=8.1CI passing

Since Aug 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/PNixx/delayed_job)[ Packagist](https://packagist.org/packages/pnixx/delayed_job)[ RSS](/packages/pnixx-delayed-job/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (8)Used By (0)

Delayed Job PHP
===============

[](#delayed-job-php)

Simple, efficient background processing for PHP uses threads to handle many jobs.

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

[](#requirements)

- PHP 8.1+
- Redis 2.2+
- Composer

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

[](#installation)

```
composer require pnixx/delayed_job
```

Worker process
--------------

[](#worker-process)

Simple run worker process in background:

```
bin/run start
```

Extend run worker process:

```
bin/run start --process 5 --queue mailer -i /path/to/init.php
```

For list all commands, please use `--help` or `-h` argument.

For restart process after deploy use `--restart` or `-r` argument. A new process will be waiting finish all running processes.

Jobs
----

[](#jobs)

Job class required include `perform` method:

```
class TestJob extends PNixx\DelayedJob\Job {

	public function perform($args = []): void {
		//Work process
	}
}
```

Any exception thrown by a job will be returned job to work with timeout. If you want set limit attempt for retries job, set `$attempt` in you class.

Jobs can also have `setup` and `completed` methods. If a `setup` method is defined, it will be called before the `perform` method. The `completed` method will be called after success job.

```
class TestJob extends PNixx\DelayedJob\Job {

	/**
	 * Queue for publishing Job
	 */
	public static string $queue = 'mailer';

	/**
	 * Attempt count used for only delayed tasks
	 * default: 0 - always repeat until it reach success
	 */
	public static $attempt = 0;

	public function setup() {
		//Setup this job
	}

	public function perform($args = []): void {
		//Work process
	}

	public function completed() {
		//Complete job callback
	}
}
```

Queueing jobs
-------------

[](#queueing-jobs)

Jobs can run in current thread uses `now` method. If you use this, you can handle the exceptions in a job failing.

```
//Run job in this thread without arguments
TestJob::now();

//Run job in this thread with arguments
TestJob::now(['name' => 'Jane']);
```

Jobs can run in a background thread or add to scheduler.

```
//Run job in a background
TestJob::later();

//Run job in a background with arguments
TestJob::later(['name' => 'Jane']);

//Add job in a scheduler.
TestJob::later(['name' => 'Jane'], strtotime('+1 day'));
```

Signals
-------

[](#signals)

- `QUIT` - Wait for job to finish processing then exit
- `TERM` / `INT` - Immediately kill job then exit without saving data

Author
------

[](#author)

Sergey Odintsov, [@pnixx](https://new.vk.com/djnixx)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance49

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~531 days

Recently: every ~790 days

Total

7

Last Release

378d ago

Major Versions

1.0.2 → 2.0.02024-06-04

2.0.0 → 3.0.02025-02-12

PHP version history (2 changes)1.0.0PHP &gt;=5.6.0

2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/02c8f1735bd7e79c5c23264f6339c560683685f8ec5b6090eb950e50bb7f486d?d=identicon)[PNixx](/maintainers/PNixx)

---

Top Contributors

[![PNixx](https://avatars.githubusercontent.com/u/1117351?v=4)](https://github.com/PNixx "PNixx (12 commits)")

---

Tags

asyncredisqueuejobamphptaskbackgroundjobsTasksdelayed\_jobdelayed

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pnixx-delayed-job/health.svg)

```
[![Health](https://phpackages.com/badges/pnixx-delayed-job/health.svg)](https://phpackages.com/packages/pnixx-delayed-job)
```

###  Alternatives

[amphp/redis

Efficient asynchronous communication with Redis servers, enabling scalable and responsive data storage and retrieval.

165634.7k44](/packages/amphp-redis)[javibravo/simpleue

Php package to manage queue tasks in a simple way

130332.1k1](/packages/javibravo-simpleue)[mjphaynes/php-resque

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

228199.3k2](/packages/mjphaynes-php-resque)[pdffiller/qless-php

PHP Bindings for qless

29113.2k1](/packages/pdffiller-qless-php)

PHPackages © 2026

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