Hi there,
I was trying to get a Scheduled Job (in SQL Server 2000) to run every second or two. I had three T-Sql blocks I needed to execute every two seconds, and you know you can just schedule recurring times to every minute.
I started out by introducing multiple Minute recurring schedules starting at different second offsets. This is okay unless you really need something more frequent (like I did, and I didn't want to add 30 different schedules by hand).
Then I thought more clearly, all I wanted was to start a job that never stoped, and, to avoid overflowing the server with executions of my 3 T-Sql blocks, do some sleeping meanwhile.
The first part is done by setting the last step to jump to the 1rst step On Success.
The last, and also easy, part is adding a Step to sleep for a period of time, I used a JScript (ActiveX Script) with the following code (for the original go here):
Date.ONE_SECOND = 1000
function nap (m) {var then = new Date(new Date().getTime() + m); while (new Date() < then) {}}
nap(<Replace with number of seconds to sleep> * Date.ONE_SECOND)
And there the process goes. To see how well it's going check the Job History and select the checkbox "Show step details".