Since we have a lot of scheduled tasks and don’t often check the logs to see whether they’re running correctly, i’ve come up with a way to have the developers emailed if the scheduled task isn’t running.
Create a table called “Util_scheduledTaskRuntimes” (Create table SQL is at the bottom of this post).
set up your scheduled task(s) in this table – name, description.
Basically each time the task runs, you set it to “running” and each time it finishes you unset the “running” flag. The task will not run if the “running” flag is set, so things don’t go over top of each other. However, if the running flag has been set and the task hasn’t been run for a long time, the developers are notified.
Check the example...

