Reputation: 4199
Can we schedule a Stored Procedure to run every 3 seconds in SQL server 2005 ? I could not find a way to schedule it so currently i am calling from front-end. The schedular interface allow minimum 1 minute of scheduling.
Upvotes: 0
Views: 863
Reputation: 294267
You can schedule it every minute to run 20 times in a loop with waitfor delay 3 seconds. Or even to run continuously in a loop with 3 second waitfor delays.
In SQL 2005 and on you can use Conversation Timers to launch activated procedures at 1 second resolution timer.
On a side note, I highly doubt such scheduling is ever necessary.
Upvotes: 3
Reputation: 9668
I dont know about run shcedule every 3 seconds, but you can write in step multiple invokes of your procedure with waitfor procedure:
WAITFOR DELAY '00:01'
Upvotes: 0