nummagumma2
asked on
Check for running SQL job before starting new job
I have a SQL job that can take a variable length of time to run. I have another job that runs on a closer schedule. If the second job starts while the first is running, it will fail. I'd like to have the second job check for the first job running, and then either WAIT or not run at all.
Ideas?
Ideas?
Why not add the steps from Job 2 to Job 1?
the convenient solution has offered by BrandonGalde. Use it..
ASKER
Sorry folks - my question wasn't clear enough.
Job1 runs once a day and can take 30 minutes to 3 hours.
Job 2 runs every 2 hours and can take 5 minutes to 30 minutes.
If they collide, there's a problem. They both need to run independently of each other.
I'd like to have Job2 check to see if Job1 is running, and if so, then WAIT and/or fail that specific instance. I hope that clears up what I'm trying to achieve
Job1 runs once a day and can take 30 minutes to 3 hours.
Job 2 runs every 2 hours and can take 5 minutes to 30 minutes.
If they collide, there's a problem. They both need to run independently of each other.
I'd like to have Job2 check to see if Job1 is running, and if so, then WAIT and/or fail that specific instance. I hope that clears up what I'm trying to achieve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.