Currently have 2 jobs that can't run in parallel. Is there a way I can defer the execution based on the status? So MAG_LOGICAR_D3_H should not run if MAG_LOGICAR_D3_M is currently running and vice versa using Microsoft SQL Server Management Studio ?
Asked
Active
Viewed 1,643 times
2
-
Either merge those two jobs in one, and treat them as two different steps, or maybe create flag somewhere in the database and set it to true when one of these jobs running, and on start always check for that flag. – j.v. Nov 17 '16 at 15:28
-
Check this question http://stackoverflow.com/questions/200195/how-can-i-determine-the-status-of-a-job – Pரதீப் Nov 17 '16 at 15:30
1 Answers
0
On way to accomplish this is using a maintenance plan.
- Add two:
Execute SQL Server Agent Job Task
. - Configure the jobs.
- Link both jobs.
- Force the execution of second job after
Success
orCompletion
of the first one.

McNets
- 10,352
- 3
- 32
- 61