June 28, 2010 at 12:32 pm
Ultimately, I want to automate (on a 3rd server) some process that will run a query every 10 minutes, to find out if an agent job did not started at all, and send some message out to alert me.
That query in essense needs to calculate what is expected to run in the last 10 minutes, and compare with what started these 10 minutes as well.
Is there anyone who has done something similar?
Thanks
June 28, 2010 at 4:07 pm
Will one of the following queries get you started?
SELECT *
FROM msdb..sysjobactivity
SELECT *
FROM msdb..sysjobhistory
SELECT *
FROM msdb..sysjobs
June 28, 2010 at 9:54 pm
The part that I need help is how to identify when a job will be executed so I can identify if it is expected to run in the last 10 minutes!
June 29, 2010 at 2:14 am
The above TSQL Statement given by LutZ will give you the information needed.
Check the column start_execution_date & Last_execution_date from the sysjobactivity table. From this info, you will know when will be the next schedule.
"More Green More Oxygen !! Plant a tree today"
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply