0PricingLogin
PHP Academy · Lesson

Job Retries, Delays, and Chaining

Configure attempts, delays, and chain dependent jobs together.

Max Attempts

Set how many times a job should be retried before being moved to failed_jobs.

<?php
class SendWelcomeEmail implements ShouldQueue
{
    public int $tries = 3; // retry up to 3 times
}

Max Exceptions

Use $maxExceptions to limit retries based on exception count (unlike attempts which count all tries including timeouts).

<?php
public int $maxExceptions = 3;

All lessons in this course

  1. Queue Concepts and Drivers
  2. Creating and Dispatching Jobs
  3. Job Retries, Delays, and Chaining
  4. Monitoring Queues with Laravel Horizon
← Back to PHP Academy