Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored proc to run agent job sequentially, help please!!!

Status
Not open for further replies.

peac3

Technical User
Jan 17, 2009
226
AU
Hi Guys,

I have two agent jobs which need to be triggered sequentially so that means the stored proc need to wait the first agent job to finish before runnning the second one.

Currently I put all the steps in job one and two in the new agent job which Iam pretty sure there is a better way to do this.

Please help or any input will be appreciated.

Thanks alot in advance
 
It is possible to have one job trigger another job on success, but i don't think you can do what you want via a stored proc.
 
Hi NoCoolHandle,

Yes, I understand I can run the sp_start_job at the end of the first job, the thing is I need the user have flexibility whether they want to run the job separately or both together.

I googled there was a stored proc to wait til first job finish then trigger the second job.

Do you have any better idea?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top