0

SQL: “Watchdog” loop to start and monitor SQL Agent Jobs

Spread the love

SQL “Watchdog” loop to start and monitor SQL Agent Jobs

This runs an SQL “Watchdog” loop to start and monitor SQL Agent Jobs. There are just a few configurable items that you can adjust to suit your needs:

  • The “Wait Delay”, which “sleeps” for the specified amount of time before checking the status of the jobs again.
  • The “Timeout” in minutes, which tells the watchdog how many minutes a job is allowed to run before being stoped by the watchdog.
  • The name of the job(s) you want the watchdog to start and monitor. One insert statement per job.

That’s it! Enjoy!
 

Code:

 


Spread the love

David Lozinski