Search code examples
sqlsql-serversql-job

Schedule a job to run only if another job is not currently running in Microsoft SQL Server Management Studio


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 ?

enter image description here


Solution

  • On way to accomplish this is using a maintenance plan.

    1. Add two: Execute SQL Server Agent Job Task.
    2. Configure the jobs.
    3. Link both jobs.
    4. Force the execution of second job after Success or Completion of the first one.