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

Dhruv Sompura's avatar

Laravel queue delay is not working

Laravel queue delay is not working dispatch(new TestJob($csv_val))->delay(now()->addSeconds(30));

0 likes
13 replies
Snapey's avatar

what queue driver?

stop the queue worker, dispatch the job, inspect the queue

1 like
Snapey's avatar

@Dhruv Sompura then no delay....

Sync jobs are always processed immediately and in-line with your normal code, so not really queued at all.

1 like
Snapey's avatar

@Dhruv Sompura You should change your queue driver to one of the others. Database is fine in most cases. Then you will need to have a queue worker running.

1 like
Dhruv Sompura's avatar

@Snapey Let me try with database, can you please explain me what is difference between sync and database?

Dhruv Sompura's avatar

@Snapey I changed to database, but queue jobs are not running automatically, while in case of sync its running automatically. I already configure supervisor.

Snapey's avatar

@Dhruv Sompura with sync, the job is executed immediately in the same request cycle as the original request. Your user has to wait whilst the job is processed.

With a queue the work to be done is stored as a record in the queue and then a separate processor thread (a worker) comes around and sees there is work to be done, gets the job from the queue and executes it.

Because this is happening in a separate thread, the original request finishes quicker and the work is completed in the background.

Snapey's avatar

@Dhruv Sompura follow the supervisor instructions carefully. Don't miss a step.

Dhruv Sompura's avatar

@Snapey first queue jobs are not running automatically with sync, queue jobs running automatically when i add supervisor

Snapey's avatar

I have no idea what you are talking about at this point

Please or to participate in this conversation.