I will try your suggestion. Though, it looks like it'll work for me.
"Adam Machanic" wrote:
> Oops, that should have been @i >= 0 in both loops, rather than @i > 0.
>
>
> --
>
> Adam Machanic
> SQL Server MVP
>
> Author, "Expert SQL Server 2005 Development"
>
http://www.apress.com/book/bookDisplay.html?bID=10220 >
>
>
> "Adam Machanic" <amachanic@IHATESPAMgmail.com> wrote in message
> news:16FCEC2A-E80B-4418-AD19-A1D573065877@microsoft.com...
> >I don't believe you can go below one minute, but you can work around it
> >easily enough. In your job, set up a loop:
> >
> >
> > DECLARE @i INT
> > SET @i = 1
> > WHILE @i > 0
> > BEGIN
> > /*
> > do whatever work you need to do, here
> > */
> >
> > WAITFOR DELAY '00:00:30'
> >
> > SET @i = @i - 1
> > END
> >
> >
> > You might have to tweak the WAITFOR interval a bit, depending on how
> > long the work actually takes to do. But if you wanted to get a bit
> > fancier--and more exact--with it, you could do something like:
> >
> >
> > DECLARE @startTime DATETIME
> > SET @startTime = GETDATE()
> >
> > DECLARE @i INT
> > SET @i = 1
> > WHILE @i > 0
> > BEGIN
> > /*
> > do whatever work you need to do, here
> > */
> >
> > WHILE DATEDIFF(second, @startTime, GETDATE()) < 30
> > WAITFOR DELAY '00:00:01'
> >
> > SET @i = @i - 1
> > END
> >
> >
> > --
> >
> > Adam Machanic
> > SQL Server MVP
> >
> > Author, "Expert SQL Server 2005 Development"
> >
http://www.apress.com/book/bookDisplay.html?bID=10220 > >
> >
> >
> > "Roz" <Roz@discussions.microsoft.com> wrote in message
> > news:BE9B5953-9687-4D3C-9DE7-7FC22B189EF4@microsoft.com...
> >> Hello, all. I need to schedule a SQL job to run every 30 seconds.
> >> However,
> >> it looks like the shortest frequency SQL will allow is every minute. Is
> >> what
> >> I want to do possible?
> >>
> >> Thnx in advance,
> >>
> >> Roz
> >