Queue Monitor

Verbb Team Verbb Team Dec 2024 1 min read

The Craft Queue (opens new window) system is a neat way to have certain tasks be processed in the background. These could be long-running tasks or process-heavy ones, but anything that can be done "later" is a good use case for queue jobs. Many of our plugins make use of this, such as Formie for sending out emails and integration payloads.

But like most things in life, queue jobs aren't perfect. Sometimes things just go wrong, and a queue job fails. This could be generating image transforms, sending Commerce emails, or a job from many of the plugins out there. A failed queue job is going to hold up the queue from processing, and (by default) a failed job doesn't retry automatically.

Failed Queue Job Alerts#

Until now, there's been no real way of tracking when a failed job occurs, which is where Queue Monitor comes in. Nominate a User Group to receive email notifications (these ones aren't sent with the queue!) and Queue Monitor will let each user in that group know whenever a queue job has failed. Simple as that!

Auto-retry#

Craft's default setting is to attempt a queue job only once, which is rather wishful thinking. You can also configure Queue Monitor to auto-retry any job that fails, setting a maximum number of retries, and how long to wait. Just in case something weird happened during the first processing of the job, and running it again kicks things into gear. It can happen.

Wrapping up#

We're hoping to save everyone a bit of heartache suddenly discovering their jobs have failed with no warning.

Queue Monitor (opens new window) is available today for Craft 4 and Craft 5 for free.