Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Lars-Janssen's avatar

Horizon is not showing Jobs

Hi,

I'm using Horizon in Laravel Forge.

The problem is that I don't see any jobs being handled. I've created a daemon in forge that runs php artisan horizon. The status of Horizon is Active.

When I run my command that dispatch several Jobs:

 UpdateWeatherJob::dispatch($port, $this->buildUrl($port));
<?php

namespace App\Jobs;

use App\Models\Port;
use GuzzleHttp\Client;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class UpdateWeatherJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * @var Port
     */
    public $port;

    /**
     * @var String
     */
    public $url;

    /**
     * UpdateWeatherJob constructor.
     * @param Port $port
     * @param String $url
     */
    public function __construct(Port $port, String $url)
    {
        $this->port = $port;
        $this->url = $url;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        sleep(5);
    }
}

Nothing happens in Horizon? What could be wrong here?

0 likes
4 replies
D9705996's avatar
D9705996
Best Answer
Level 51

Has this ever worked? If so you might have hit a gotcha with laravel 5.7 as QUEUE_DRIVER env variable was changed to QUEUE_CONNECTION=.

If this has never worked can you share your .env file (remove anything sensitive, such as credentials, APP_KEY, etc).

You might just need to change QUEUE_CONNECTION=redis

6 likes
ralphjsmit's avatar

I had the same problem and changing QUEUE_CONNECTION=sync to QUEUE_CONNECTION=redis did it, very good advice! Thanks man.

By default it's set to sync and I only changed it on my local .env and I overlooked it in my production .env.

1 like
Lars-Janssen's avatar

@D9705996

Thanks for helping. I did had indeed QUEUE_CONNECTION I changed that but still not working. It's the first time I set this up in Forge. I did restart the daemon!

APP_ENV=local
APP_KEY=base64:CiyCasdfsdfasdf
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=mydb
DB_USERNAME=forge
DB_PASSWORD=mypassword

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_CONNECTION=redis

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=

The redis driver in my config/queue.php looks like this:

  'redis' => [
            'driver' => 'redis',
            'connection' => 'default',
            'queue' => 'default',
            'retry_after' => 90,
            'block_for' => null,
        ],

Please or to participate in this conversation.