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

bgdev's avatar
Level 1

Laravel 5.1 dispatch job with tries override?

On my Forge Server I have configured a beanstalkd worker with Tries set to 3. From a Console command, I am dispatching a Job to send emails, such as:

$job = ( new SendEmail($message) );
$this->dispatch($job);

This works as expected, however there are instances where I'd like to override the tries parameter and have this Job only be attempted one time.

With later versions of Laravel you can set this from within the Job class, such as:

public $tries = 1; 

Is there a way to achieve this in Laravel 5.1?

Thanks in advance for any help!

0 likes
0 replies

Please or to participate in this conversation.