Is it possible to make Job Schedule, which will occur every less than 10 seconds? Because Sql server doesn't allow that. Schedule type is "Recurring" and Occurs "Daily".
Asked
Active
Viewed 7,811 times
2 Answers
3
Select occurs Daily and run every 10 seconds. Although keep in mind if your job takes longer than the time specified to run, the agent won't invoke it again until the running task completes.
See comments below. The UI tool doesn't allow input for less than 10 seconds. In your case you could schedule two job tasks offset by some number of seconds. The issue then is that the jobs could overlap as they are distinct tasks as far as SQL Agent knows.

Yuck
- 49,664
- 13
- 105
- 135
-
thanks, I did the same, but this will invoke job every 10 seconds(if job takes less than 10 seconds), is it possible to make duration between job invokes less than 10 seconds?? – scatterbraiin May 04 '11 at 12:55
-
Wow...you're right, the tool doesn't allow you to make it smaller. You should edit the original post to mention that! =) – Yuck May 04 '11 at 12:58
0
I tried do something similar (SQL Server job with prcise timing), but the only reliabile way I found was custom windows service execution SQL statements.
-
I guess there is not a way, but you can kinda reach the result by having Loop in step with WAITFOR DELAY. It's of course, not what I wanted, but result could be the same – scatterbraiin May 04 '11 at 15:13
-
I tried have a script "WHILE 0=0 BEGIN EXEC MyProc; WAITFOR DELAY '00:00:05'; END" but it must be still called from some process. And if occures some fatal error during "MyProc", the script will end. Aftear that you still need some mechanics for reexecuting the script. – TcKs May 04 '11 at 15:37
-
I made a job which occurs every 10 seconds and it executes "WHILE 0=0 BEGIN EXEC MyProc; WAITFOR DELAY '00:00:05'; END kind of script. Of course, it's not a good solution. – scatterbraiin May 06 '11 at 09:22