Created
August 8, 2022 16:29
-
-
Save shawnlindstrom/ab6922b9ee1635118fd4268a5702f33c to your computer and use it in GitHub Desktop.
Retry a failed Laravel queue job for a specific date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @credit Luke Waite | |
* @see https://lukewaite.ca/posts/2017/08/17/bash-oneliner-laravel-retry-todays-failed-jobs.html | |
* | |
* See the explanation in Luke's post for the following Bash one liner to retry | |
* a failed queue job for a specific date. The only difference in this version | |
* is {print $2} needs to be {print $3} because the output of queue:failed has | |
* changed. Works for Laravel 9. | |
* | |
* Running the following line will retry all failed jobs from 8/8/2022. | |
**/ | |
php artisan queue:retry $(php artisan queue:failed | grep 2022-08-08 | awk '{print $3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment