0

We are using approximately 100 jobs in our sql server agent. Need query to find out the list of long running jobs based on some filters(Putting threshold values) in sql server agent and send out an email to team.

For Example:

I have one job name as "A_Daily" and running on daily basis and average execution time is 30 minute. We can give half an hour buffer and set the values as 1 hour (threshold value). If this job runs more than an hour , then it should be picked up in the list and send out an alert.

Could someone please help us on it?

Thanks & Regards,

Rajesh

raj
  • 65
  • 1
  • 1
  • 4
  • This is a fairly common request; so there's a good few answers out there for you already. For example this is a question related to this: https://stackoverflow.com/questions/10726585/sql-agent-job-determine-how-long-it-has-been-running?rq=1 – gvee Apr 18 '19 at 07:14
  • Possible duplicate of [SQL Agent Job: Determine how long it has been running](https://stackoverflow.com/questions/10726585/sql-agent-job-determine-how-long-it-has-been-running) – gvee Apr 18 '19 at 07:15

0 Answers0