Is there any way to get the queued job from the job ID in Laravel? While adding the job to the queue, I store the job ID. Later at some point of time (there is a delay to process the job in the queue), I want to remove the job from the queue. If I can get the job on the queue using the job ID, I can use delete()
method to remove it.
I use this code for laravel 5.5 :
use Illuminate\Contracts\Bus\Dispatcher;
$job = ( new JOB_CLASS() )->onQueue('QUEUE_NAME')->delay('DELAY');
$id = app(Dispatcher::class)->dispatch($job);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With