How to Schedule a job after another job

  • Hi,

    Anyone knows how to schedule a job after another job run? Or Calling a job inside another job. It sounds very simple, but I can't find out how to do it.

    Thanks

  • You can start the second job using a stored procedure call in the first job.

    execute msdb.dbo.sp_start_job @JobName

  • You can have 2 steps in the same job to execute one after other.

    The 1st Step is your 1st Job and 2nd Step is the 2nd Job


    Zaheer

  • For the second option, how should we do it exactly? If I make a new job step, there is no option to choose a type to be SQL job.

  • You can't make a step a SQL Job.

    What Zaheer is saying is to rather than have 2 scheduled jobs, create one job and have two steps so you go from step 1 to step 2.

    If, however, you need two scheduled processes (say job A & job B), but based on some outcome in job A, you need to force job B to run, then use the sp_start_job command as recommended.

  • Thanks, that's answered my question. I don't want to remake the jobs.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply