Hi,
I was wondering if it was possible in SQL Server 2005, to be able to
set a job to run, say every 30 seconds? Reason is that we have a job
that runs on our web site which polls every 10 seconds, if it has
finished after 3 polls, then I need to update a few tables. If it's
every minute, then there will be a 30 second wait until the tables are
updated.
Would appreciate any help on this.One option is to have the job constantly running and use WAITFOR inside your TSQL code (in a WHILE
loop).
Or check out http://sqldev.net/sqlagent/SQLAgentRecuringJobsInSecs.htm. The article is for 2000, but
I wouldn't be surprised if it also applies to 2005.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"nomad" <d.bedgood@.btinternet.com> wrote in message
news:e0671520-ce13-4a23-a298-4ff9591e9f99@.n20g2000hsh.googlegroups.com...
> Hi,
> I was wondering if it was possible in SQL Server 2005, to be able to
> set a job to run, say every 30 seconds? Reason is that we have a job
> that runs on our web site which polls every 10 seconds, if it has
> finished after 3 polls, then I need to update a few tables. If it's
> every minute, then there will be a 30 second wait until the tables are
> updated.
> Would appreciate any help on this.|||On Jan 28, 12:03 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> One option is to have the job constantly running and use WAITFOR inside your TSQL code (in a WHILE
> loop).
> Or check outhttp://sqldev.net/sqlagent/SQLAgentRecuringJobsInSecs.htm. The article is for 2000, but
> I wouldn't be surprised if it also applies to 2005.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "nomad" <d.bedg...@.btinternet.com> wrote in message
> news:e0671520-ce13-4a23-a298-4ff9591e9f99@.n20g2000hsh.googlegroups.com...
> > Hi,
> > I was wondering if it was possible in SQL Server 2005, to be able to
> > set a job to run, say every 30 seconds? Reason is that we have a job
> > that runs on our web site which polls every 10 seconds, if it has
> > finished after 3 polls, then I need to update a few tables. If it's
> > every minute, then there will be a 30 second wait until the tables are
> > updated.
> > Would appreciate any help on this.
That's perfect. Thanks very much Tibor.|||On Jan 28, 11:48 am, nomad <d.bedg...@.btinternet.com> wrote:
> Hi,
> I was wondering if it was possible in SQL Server 2005, to be able to
> set a job to run, say every 30 seconds? Reason is that we have a job
> that runs on our web site which polls every 10 seconds, if it has
> finished after 3 polls, then I need to update a few tables. If it's
> every minute, then there will be a 30 second wait until the tables are
> updated.
> Would appreciate any help on this.
One option is to add 2 schedules to the job. Both jobs run ever
minute but one starts on the minute and one starts at 0:30. This
keeps all the scheduling in the job and doesn't require any code
changes.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment