Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
What is Horizon?
Laravel Horizon provides a beautiful dashboard and code-driven configuration for Laravel Redis queues. It lets you monitor job throughput, runtime, and failures in real time while managing all worker configuration in a single version-controlled file.Horizon extends Laravel’s core queue system. Make sure you are familiar with Queues & Jobs before proceeding. A running Redis instance is also required.
Installation
Install Horizon via Composer:config/horizon.php and app/Providers/HorizonServiceProvider.php.
Configuration
config/horizon.php overview
All worker configuration lives inconfig/horizon.php. The core option is environments, which defines worker process options per environment.
Horizon reserves the
horizon Redis connection name internally. Do not assign this name to another connection in config/database.php.Supervisors
Each environment can contain one or more supervisors. A supervisor manages a group of worker processes and handles balancing across queues. You can define multiple supervisors per environment to apply different strategies to different queues.Default values
Use thedefaults option to specify configuration values shared across all supervisors, reducing repetition.
Maintenance mode
When the application is in maintenance mode, Horizon stops processing jobs by default. To force processing, setforce to true:
Max job attempts
tries to 0 allows unlimited attempts.
Job timeout
Job backoff
Specify how long Horizon waits before retrying a job that encountered an exception.Balancing strategies
Horizon offers three worker balancing strategies.auto (default)
auto (default)
Automatically adjusts the number of worker processes per queue based on current workload. Configure the range with
minProcesses and maxProcesses.time— scales based on estimated time to clear the queuesize— scales based on number of jobs in the queue
With
auto balancing, queue order does not imply priority. Use multiple supervisors with explicit resource limits to enforce priorities.simple
simple
Distributes a fixed number of worker processes evenly across the specified queues.The example above assigns 5 processes to each queue.
false (no balancing)
false (no balancing)
Processes queues strictly in the listed order, similar to Laravel’s default queue system. Horizon still scales worker count as jobs accumulate.Jobs in
default are always processed before notifications.Dashboard authorization
The Horizon dashboard is accessible at/horizon. In local environments, it is open to everyone by default. In non-local environments, access is controlled by the authorization gate in app/Providers/HorizonServiceProvider.php.
Running Horizon
Artisan commands
Auto-restart during development
Usehorizon:listen to automatically restart Horizon when files change.
Keeping Horizon running with Supervisor
In production, use Supervisor to ensure Horizon restarts automatically if it stops.Install Supervisor
Supervisor configuration
Create/etc/supervisor/conf.d/horizon.conf:
Start Supervisor
On deployment
Terminate Horizon during each deployment so the process monitor restarts it with your new code:autostart=true and autorestart=true in the Supervisor config, Horizon will start back up automatically.
Managing jobs
Tags
Horizon automatically tags jobs based on the Eloquent models they receive.tags() method on the job:
tags():
Silencing jobs
Hide specific jobs from the “Completed Jobs” list by adding them to thesilenced option in config/horizon.php.
Silenced interface directly on the job class:
Metrics and monitoring
Horizon’s metrics dashboard shows job and queue throughput and wait times. Schedule thehorizon:snapshot command to populate it.
Job failure notifications
Receive notifications when a queue’s wait time exceeds a threshold. Configure notification recipients in theboot() method of app/Providers/HorizonServiceProvider.php.
Wait time thresholds
Configure how many seconds constitute a “long wait” inconfig/horizon.php:
0 disables notifications for that queue.
Managing failed jobs
Delete a specific failed job by ID or UUID:Upgrading Horizon
When upgrading to a new major version, review the Horizon upgrade guide carefully.Related pages
Queues & Jobs
Laravel queue fundamentals: job creation, dispatch, batches, and failed job handling.
Redis
Configure and use Redis — the required backend for Horizon.