November 28, 2007 at 2:56 pm
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
November 28, 2007 at 3:58 pm
You can start the second job using a stored procedure call in the first job.
execute msdb.dbo.sp_start_job @JobName
November 28, 2007 at 5:07 pm
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
November 29, 2007 at 10:15 am
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.
November 29, 2007 at 10:30 am
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.
November 29, 2007 at 10:42 am
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