PHPackages                             queues/queue-manager - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. queues/queue-manager

ActiveLibrary[Queues &amp; Workers](/categories/queues)

queues/queue-manager
====================

Manage queues and run jobs

v1.0.0(8y ago)129MITPHPPHP ^7.0

Since Mar 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hfnukal/queue-manager)[ Packagist](https://packagist.org/packages/queues/queue-manager)[ Docs](http://honzicek.com/queue)[ RSS](/packages/queues-queue-manager/feed)WikiDiscussions master Synced 6d ago

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

queue-manager
=============

[](#queue-manager)

Queue management in PHP. Purpose of this library is to have basic queue management for common hosting. Cron job, that opens webpage in some interval is what will be enough. Is it possible to set max time limit for running jobs as many hosting services has limited execution time. Main goal was to run tasks in background that needs to run slow.

Useful when you do not have possibility to instal any queue management

Instalation
-----------

[](#instalation)

Add to project using composer

```
composer require queues/queue-manager:1.0.0@dev
```

Usage
-----

[](#usage)

Create custom job. Just extend \\Queue\\Job and override run method. Run method returns transformed data.

```
class LongJob extends \Queue\Job {
    public function run() {
        sleep(10);
        return $this->getData();
    }

}
```

### Add Job to queue

[](#add-job-to-queue)

When creating instance of QueeuManager, pass context and queue name. Context can be empty or array or some manager.

```
$queue='MyQueue';
$context=array();
$newJob = new LongJob()
$queuemanager = new QueueManager($context, $queue);
$queuemanager->getQueue($name)->addJob($newJob);
```

If you using some kind of framework, e.g. Symfony, you can use dependency injection to get instance of QueueManager.

### To execute jobs in queue. Usecase is run this every minute.

[](#to-execute-jobs-in-queue-usecase-is-run-this-every-minute)

```
$queuemanager->getRunner($name)->runJobs();
```

### If you want to run in loop.

[](#if-you-want-to-run-in-loop)

```
$queuemanager->getRunner($name)->loop();
```

### You can set parametters to runner

[](#you-can-set-parametters-to-runner)

**$maxJobCount** - how many jobs will run in one loop **$maxJobTime** - how long can run one loop cycle. This is useful if you running loop by calling weburl with cron job and page execution has execution time limit. **$sleeptime** - sleep time when run in loop

```
$runner = $queuemanager->getRunner($name);
$runner->maxJobCount=1;
```

### Using context to inject connection.

[](#using-context-to-inject-connection)

```
class MyAppJob extends \Queue\Job {
    public $connection;

    public function init($context=NULL) {
        $this->connecton=$context->get(\My\Connection::class);
    }

}
```

Browsing queues
---------------

[](#browsing-queues)

Queue interface provides methosds to get list of queued Jobs

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2986d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00c4bafc26b55aefc5224eda89e69a84200a8353c4659f9312e37813e9871bb9?d=identicon)[hfnukal](/maintainers/hfnukal)

---

Top Contributors

[![hfnukal](https://avatars.githubusercontent.com/u/1519711?v=4)](https://github.com/hfnukal "hfnukal (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/queues-queue-manager/health.svg)

```
[![Health](https://phpackages.com/badges/queues-queue-manager/health.svg)](https://phpackages.com/packages/queues-queue-manager)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[novosga/novosga

Customer queue management system

26457.9k](/packages/novosga-novosga)[contributte/scheduler

PHP job scheduler (cron) with locking

31835.3k1](/packages/contributte-scheduler)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)[orisai/scheduler

Cron job scheduler - with locks, parallelism and more

4037.1k4](/packages/orisai-scheduler)[neighborhoods/kojo

Neighborhoods Kōjō is a distributed task manager.

1520.6k2](/packages/neighborhoods-kojo)

PHPackages © 2026

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