Per Nergård
Dec 5, 2012
  3031
(1 votes)

Monitoring status of scheduled jobs

Scheduled jobs are a convenient way of performing different tasks in an automated way.
Since it's common that jobs performs something with pages it's not uncommon that something changes so the job will break.

A website admin should check the status of the active jobs on a regular basis, but my experience is that's not very common.

So finding out about a failed job usually take unnecessary long time.
I decided that I wanted to do something about it so I created a scheduled job that will perform a check on all active jobs and report back which ones have failed.

Ok it will not find out if someone disables a job or disables the actual scheduler service but it’s good enough for me.

The monitoring job sends out an status email.

The email recipients are specified on a string property on the start page. Several addresses can be separated with comma signs.


Three different mails are sent out.


1. Failed jobs found
The mail contains a descriptive text and a table with two columns: name of the failed job and the error message.
2. No failed jobs found
The mail contains a descriptive text that everything seems fine.
3 The monitoring job it selves crashes for some reason
Basically the same as .1. The descriptive text says that the job monitoring the others has failed and someone needs to have a look.

The job is built for CMS6 and is easy to get to work for CMS5 and I don’t now but my guess is that it will work for CMS7 with no changes.

You can get the source code over at the code section.

Happy monitoring!

Dec 05, 2012

Comments

Isabella Gross Alström
Isabella Gross Alström Oct 14, 2020 01:17 PM

This is exactly what I am looking for - but the code section link is no longer working :( Do you have this code still somewhere?

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024