Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ammyhus
Starting Member
8 Posts |
Posted - 2012-10-14 : 01:51:04
|
i have a job which i need to rerun only after it completes. below is the code i have written for it.beginexec dbo.Main_SMS_Procedureif @@error = 0WAITFOR DELAY ''000:00:10''elsebreakend'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. |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-10-14 : 12:17:08
|
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 http://www.sqlserver-dba.com/2012/01/sql-agent-jobs-schedule-in-seconds.htmlHow are you running the code you've sent?Jack Vamvas--------------------http://www.sqlserver-dba.com |
|
|
|
|
|