PHPackages                             justbetter/laravel-horizon-restarter - 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. justbetter/laravel-horizon-restarter

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

justbetter/laravel-horizon-restarter
====================================

Automatically restart Laravel Horizon

1.0.0(1y ago)23.5k↓16.7%MITPHPPHP ^8.3CI passing

Since May 6Pushed 11mo ago5 watchersCompare

[ Source](https://github.com/justbetter/laravel-horizon-restarter)[ Packagist](https://packagist.org/packages/justbetter/laravel-horizon-restarter)[ RSS](/packages/justbetter-laravel-horizon-restarter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

[ ![Banner](./art/banner.svg)](https://github.com/justbetter/laravel-horizon-restarter "Horizon Restarter")Laravel Horizon Restarter
=========================

[](#laravel-horizon-restarter)

 [![Tests](https://camo.githubusercontent.com/7fdc6427a0a07060447fad7d87c3ea440c81cd10070846d260b36ef491526b39/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a7573746265747465722f6c61726176656c2d686f72697a6f6e2d7265737461727465722f74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-horizon-restarter) [![Coverage](https://camo.githubusercontent.com/4bcc75be1b4168bedc512294e06998bf5f0a15200c2124016974a8aa19dc9345/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a7573746265747465722f6c61726176656c2d686f72697a6f6e2d7265737461727465722f636f7665726167652e796d6c3f6c6162656c3d636f766572616765267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-horizon-restarter) [![Analysis](https://camo.githubusercontent.com/361f5bce37756c55e81fc71aff25921a69702e8cd9421a6606c50c81cad6e7e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a7573746265747465722f6c61726176656c2d686f72697a6f6e2d7265737461727465722f616e616c7973652e796d6c3f6c6162656c3d616e616c79736973267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-horizon-restarter) [![Total downloads](https://camo.githubusercontent.com/d71e1cd4dd3b21e6b1aeb1a1e88ba867439144e7ea6cab0dfd05b038a780992f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a7573746265747465722f6c61726176656c2d686f72697a6f6e2d7265737461727465723f636f6c6f723d626c7565267374796c653d666c61742d737175617265)](https://github.com/justbetter/laravel-horizon-restarter)

Automatically restart Horizon after a given amount of jobs.

Why?
----

[](#why)

PHP is not designed for long running processes, it can sometimes run into issues when it has been running for too long. Horizon workers can automatically be stopped after processing a configured amount of jobs (maxjobs). However, depending on the balanceMaxShift and balanceCooldown, it may take a while before all processes are running again. This package will automatically restart Horizon gracefully after a given amount of jobs have been processed.

This package is to simplify configuration and to ensure that Horizon is restarted automatically.

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

[](#installation)

You can install the package via composer:

```
composer require justbetter/laravel-horizon-restarter
```

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

[](#configuration)

By default, after 100.000 jobs have been processed, Horizon will be terminated. This can be configured by adding the following to your `.env` file:

```
HORIZON_RESTARTER_THRESHOLD=100000

```

Quality
-------

[](#quality)

To ensure the quality of this package, run the following command:

```
composer quality
```

This will execute three tasks:

1. Makes sure all tests are passed
2. Checks for any issues using static code analysis
3. Checks if the code is correctly formatted

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ramon Rietdijk](https://github.com/ramonrietdijk)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

[ ![JustBetter logo](./art/footer.svg)](https://justbetter.nl "JustBetter")

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance51

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

377d ago

### Community

Maintainers

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

---

Top Contributors

[![VincentBean](https://avatars.githubusercontent.com/u/3906942?v=4)](https://github.com/VincentBean "VincentBean (7 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/justbetter-laravel-horizon-restarter/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-laravel-horizon-restarter/health.svg)](https://phpackages.com/packages/justbetter-laravel-horizon-restarter)
```

###  Alternatives

[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63714.4k1](/packages/mpbarlow-laravel-queue-debouncer)[eyewitness/eye

Eyewitness.io client for Laravel 5 applications

116151.8k](/packages/eyewitness-eye)[convenia/pigeon

3233.0k](/packages/convenia-pigeon)[baklysystems/laravel-chat-messenger

Laravel chat package

121.8k](/packages/baklysystems-laravel-chat-messenger)

PHPackages © 2026

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