PHPackages                             webparking/laravel-queue-ensurer - 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. webparking/laravel-queue-ensurer

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

webparking/laravel-queue-ensurer
================================

This composer package provides a Laravel queue ensurer.

1.3.0(5y ago)6416.1k7[1 PRs](https://github.com/webparking/laravel-queue-ensurer/pulls)MITPHPPHP &gt;=7.1.0CI failing

Since Mar 25Pushed 2y ago5 watchersCompare

[ Source](https://github.com/webparking/laravel-queue-ensurer)[ Packagist](https://packagist.org/packages/webparking/laravel-queue-ensurer)[ RSS](/packages/webparking-laravel-queue-ensurer/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (7)Versions (9)Used By (0)

 Laravel Queue Ensurer
=======================

[](#--laravel-queue-ensurer)

 [ ![Build Status](https://camo.githubusercontent.com/75980f39561122cb965c90f64460ab9d2aa98daff6ddfdca355e0c3580e9a140/68747470733a2f2f7472617669732d63692e6f72672f7765627061726b696e672f6c61726176656c2d71756575652d656e73757265722e7376673f6272616e63683d6d6173746572) ](https://travis-ci.org/webparking/laravel-queue-ensurer) [ ![Quality score](https://camo.githubusercontent.com/843a3c7ee47ff2c465892c705ca9c60e84a83a4f755be4460f4eb2333034ef5c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765627061726b696e672f6c61726176656c2d71756575652d656e73757265722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572) ](https://scrutinizer-ci.com/g/webparking/laravel-queue-ensurer/?branch=master) [ ![Code coverage](https://camo.githubusercontent.com/e19793bec10224df856371370e04ab899862a52a93d3831c200a4d9c7d81f8d1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765627061726b696e672f6c61726176656c2d71756575652d656e73757265722f6261646765732f636f7665726167652e706e673f623d6d6173746572) ](https://scrutinizer-ci.com/g/webparking/laravel-queue-ensurer/?branch=master)

This package provides a command (`queue:ensure-processes`) to allow running the Laravel queue worker (`queue:work`) from the Laravel schedule. This enables a cronjob to ensure that configured queue workers are running. It eliminates the need for a process manager like [supervisord](http://supervisord.org/), which is not available in all production environments (like when working with DirectAdmin or most other server control panels).

Multiple queues can be configured and the number of desired processes can be configured per queue (which makes it possible to run multiple jobs in parallel). Doing so, allows having the queue configuration in your project's codebase.

This package doesn't care about which queue driver(s) you use and `queue:restart` still works as normal.

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

[](#installation)

```
composer require webparking/laravel-queue-ensurer

```

By default, the `queue:ensure-processes` command is configured to run once a minute, ensuring one worker for the default queue. So if that's all you desire, you're good to go.

Configuration
-------------

[](#configuration)

You can publish the configuration file to your project by running `php artisan vendor:publish --provider="Webparking\QueueEnsurer\ServiceProvider" --tag="config"`.

The documentation for the configurable options can be found in the config file.

Working
-------

[](#working)

The queue ensurer works by keeping a cache of process id's (PID's) it has started. Every time the ensurer runs, it does this:

1. Remove any PID's of stopped processes from the cache. These processes may have been stopped by a server reboot, `queue:restart` or for any other reason.
2. Kill processes belonging to no longer configured queue's and remove their PID's from the cache. When a queue was configured to have processes before, but is not configured now.
3. Kill processes that are no longer required and remove their PID's from the cache. When the number of configured processes is lower than the number of running processes.
4. Start new processes and add their PID's to the cache. When the number of configured processes is higher than the number of running processes.

This means that the ensurer will not take in account any processes it has not started itself.

For the PID cache, the ensurer uses a JSON file (`storage/app/queue-listener-pids.json`) instead of the Laravel cache mechanism. If the queue ensurer were to use the Laravel cache and the cache were to be cleared (`php artisan cache:clear`), the running processes would not be known to the ensurer any longer. Resulting in it starting new processes, without every killing the old ones.

Contribution and development
----------------------------

[](#contribution-and-development)

We're happy to receive pull requests or issues.

When developing, you can run `composer test` to execute all code quality checks and tests.

Future features
---------------

[](#future-features)

These are features we may add. We don't have a specific need for them now, but we acknowledge their usefulness and we will add them when we have some down time. Should you or your project require one or more of these future features earlier, please submit a PR or create an issue.

- Testing compatibility with Lumen

Licence and Postcardware
------------------------

[](#licence-and-postcardware)

This software is open source and licensed under the [MIT license](LICENSE.md).

If you use this software in your daily development we would appreciate to receive a postcard of your hometown.

Please send it to: Webparking BV, Cypresbaan 31a, 2908 LT Capelle aan den IJssel, The Netherlands

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% 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 ~106 days

Recently: every ~128 days

Total

6

Last Release

2068d ago

### Community

Maintainers

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

---

Top Contributors

[![JeroenVanOort](https://avatars.githubusercontent.com/u/5616838?v=4)](https://github.com/JeroenVanOort "JeroenVanOort (16 commits)")[![RVxLab](https://avatars.githubusercontent.com/u/46111684?v=4)](https://github.com/RVxLab "RVxLab (3 commits)")

---

Tags

phplaravelqueuequeuesensurer

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webparking-laravel-queue-ensurer/health.svg)

```
[![Health](https://phpackages.com/badges/webparking-laravel-queue-ensurer/health.svg)](https://phpackages.com/packages/webparking-laravel-queue-ensurer)
```

###  Alternatives

[renoki-co/horizon-exporter

Export Laravel Horizon metrics using this Prometheus exporter.

24152.7k](/packages/renoki-co-horizon-exporter)[stackkit/laravel-google-cloud-tasks-queue

Google Cloud Tasks queue driver for Laravel

84570.1k](/packages/stackkit-laravel-google-cloud-tasks-queue)[pmatseykanets/artisan-beans

Easily manage your Beanstalkd job queues right from the Laravel artisan command

4482.1k](/packages/pmatseykanets-artisan-beans)

PHPackages © 2026

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