When queue:failed isn't enough: building a better failed jobs CLI
If you've ever managed Laravel queues in production, you know the drill. A job fails, you run php artisan queue:failed, and you're greeted with a wall of text that's nearly impossible to parse when you have hundreds of failed jobs staring back at you.
I've been there countless times. Scrolling through endless output, trying to find that one SendEmailJob that failed yesterday, or wondering how many jobs failed on the notifications queue this week. The native command works, but it wasn't built for the complexity of modern production environments.
So I built something better.
Introducing Laravel Enhanced Failed Jobs
The package extends Laravel's native queue:failed command with features that should have been there from the start: JSON output, advanced filtering, and the ability to actually find what you're looking for.
composer require mvpopuk/laravel-enhanced-failed-jobs
That's it. No configuration needed. The package auto-registers and enhances your existing queue:failed command.
Filtering That Actually Works
Need to see only email-related failures from the last 24 hours?
php artisan queue:failed --queue=emails --after=yesterday
Looking for a specific job class? Partial matching has you covered:
php artisan queue:failed --class=SendEmail
You can combine filters however you need:
php artisan queue:failed --queue=critical --connection=redis --after="2025-11-20" --limit=50
JSON Output
This is where things get interesting. The --json flag transforms the output into structured data that your automation tools can actually consume:
php artisan queue:failed --json
Suddenly, your failed jobs become queryable with jq, parseable by your monitoring scripts, and integrable with your deployment pipelines.
Here's a practical example—failing a deployment if critical jobs have failed:
FAILED_COUNT=$(php artisan queue:failed --queue=critical --json | jq '.count')
if [ "$FAILED_COUNT" -gt 0 ]; then
echo "Deployment blocked: $FAILED_COUNT critical jobs failed"
exit 1
fi
No more silent failures slipping through your CI/CD pipeline.
What's Next: QueueWatch
I'm currently working on QueueWatch which is an optional dashboard that provides real-time failure reporting, multi-app monitoring, and alerts through Slack, Discord, and more. The CLI tools will always remain free and open source, with QueueWatch as an optional add-on for teams that need centralized monitoring.
Get Started
The package is available now on GitHub and Packagist:
composer require mvpopuk/laravel-enhanced-failed-jobs
Check out the repository at github.com/mvpopuk/laravel-enhanced-failed-jobs and let me know what features you'd like to see next.