Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 job rerun
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

8 Posts

Posted - 10/14/2012 :  01:51:04  Show Profile  Reply with Quote
i have a job which i need to rerun only after it completes. below is the code i have written for it.

exec dbo.Main_SMS_Procedure
if @@error = 0
WAITFOR DELAY ''000:00:10''

but thats not whats happening the job does not wait till it is over and reruns it self again after 10 sec delay.

would appriciate if i could have a solution for the job to rerun only when it complete or fails.

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 10/14/2012 :  12:17:08  Show Profile  Visit jackv's Homepage  Reply with Quote
You could use the SQL Server Agent as a real time scheduler . There is potential for sub minute scheduling - and therefore you can use the buitin fail\success workflow logic. You'll notice on the GUI you can't set up in sub minute - check this link for instruactions

How are you running the code you've sent?

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000