Hey All,
I have a stored procedure scheduled to run a job every ten minutes that I was doing some testing on.
It usually takes about a minute to run, so when I'm testing it out, I like to run it on the 5th minute of every ten minute period to be sure that it doesn't interfere with the jobs run.
To make sure this happens every time, I created a quick snippet to find the current offset needed in a WAITFOR statement so it'll run the next time the time ends in a 5.
This doesn't account for seconds intentionally because I want there to be no delay if the GETDATE() statement returns a value in the 5th minute.
Facebook Social Comments