Reputation: 1591
I have a sql job who does some calculation in every 15 minutes.
Now i want to monitor this job. To check if that job is currently running and if yes then its been running for more than 10 minutes.
If it's running for more than 10 minutes then i want to stop/kill this job.
Is there any query available to do it?
Upvotes: 1
Views: 7771
Reputation: 16146
My best guess is you need SMO (SQL Server Management Objects) to pull this off. In particular take a look at the Job Class.
Upvotes: 0