Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

Get notified when a queued job fails

Link –

Laravel provides excellent support for queued jobs. It's very easy to put something on a queue and out of the box a lot of queue backends such as Beanstalkd, SQS and Redis are supported. Most of the time queued jobs will perform their job without any problem. But have you considered that a queued job can fail too?

Laravel can create a failed jobs table and write a record when a queued jobs fails. There is even a command to retry a failed job:

php artisan queue:retry 5

That's nice! But how do you know if there is a job that failed? Sure you could check the failed jobs table from time to time, but I promise you after a while you won't do that anymore. If you have many applications, checking all those failed job tables will get downright tedious.

To get notified when a queued job fails our intern Jolita created a package called failed job monitor. It hooks into the JobFailed-event Laravel 5.2 fires when a queued job fails. Once it is installed you will receive a mail whenever this event occurs. Integration with Slack comes built-in as well. Here's how a Slack notification looks like:

failed job

Read the full instructions on how to install and use it on GitHub.

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.