Artisan command to prune stale jobs in Laravel 8.x

1 · Amit Merchant · June 29, 2021, 5:21 a.m.
In Laravel, when your queued jobs fail after a job has exceeded the number of attempts, it will be inserted into the failed_jobs database table (if you have set it up). This is to provision for retrying those jobs at a later time using the following command. php artisan queue:retry 5 Here 5 is the ID of the failed job that you want to retry or you can also provide the range of IDs as well using --range options like so. $ php artisan queue:retry --range=5-10 Now, there might be situations where...