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:

 

(Visited 3,613 times, 5 visits today)

Spread the love
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x