Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL 2000 - schedule jobs for 10 seconds?

Posted on 2011-03-19
3
Medium Priority
?
371 Views
Last Modified: 2012-05-11
This is SQL 2000. I have a SQL Script that i want to scheudle to run every 10 seconds.

Looked at the job scheduling and the least amount of time is 1 minute. What can I do? what are my other options??
0
Comment
Question by:Camillia
3 Comments
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 1000 total points
ID: 35171783
hi use the SP to create the schedule

this sample will create a scedule for a every 10 seconds

EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N'SCHEDULE',
            @enabled=1,
            @freq_type=4,
            @freq_interval=1,
            @freq_subday_type=2,
            @freq_subday_interval=10,
            @freq_relative_interval=0,
            @freq_recurrence_factor=0,
            @active_start_date=20070211,
            @active_end_date=99991231,
            @active_start_time=0,
            @active_end_time=235959
 
0
 
LVL 11

Assisted Solution

by:JoeNuvo
JoeNuvo earned 1000 total points
ID: 35171801
For this requirement on the system I ever work with.

I combine job schedule with WAITFOR DELAY '000:00:10'
in the job, it will run 5-6 rounds of command together with WAITFOR DELAY (depend on how fast the query run)
0
 
LVL 7

Author Comment

by:Camillia
ID: 35172341
Is this line says 10 seconds: @freq_subday_interval=10,

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question