Is there a way in sql server to schedule a job for every 30 seconds.
At present the minimum I can set it to is every 1 minute.
Thanks
farshad
/*
select job_id
from msdb.dbo.sysjobs
where (name = N'sec')
*/
declare @.rc int
exec @.rc = msdb.dbo.sp_add_jobschedule
@.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
of job you create the schedule for
@.name = N'Sec', -- name of the schedule
@.enabled = 1, -- enable the schedule for use
@.freq_type = 4, -- daily frequency
@.active_start_date = 20030706, -- date from which schedule will be
active (July 6, 2003)
@.active_start_time = 0, -- time from which schedule will be
active (midnight)
@.freq_interval = 1, -- unused for daily
@.freq_subday_type = 2, -- seconds
@.freq_subday_interval = 10, -- every 10 seconds
@.freq_relative_interval = 0, -- unused for daily
@.freq_recurrence_factor = 0, -- unused for daily
@.active_end_date = 99991231, -- date which schedule becomes
inactive (Dec. 31, 9999)
@.active_end_time = 235959 -- time which schedule becomes
inactive (23:59:59)
if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
16)
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
> Is there a way in sql server to schedule a job for every 30 seconds.
> At present the minimum I can set it to is every 1 minute.
> Thanks
|||Thanks for the reply but I was wondering if there is an option in the
enterprise window for setting the schedule to seconds rather than minutes.
"Uri Dimant" wrote:
> farshad
> /*
> select job_id
> from msdb.dbo.sysjobs
> where (name = N'sec')
> */
> declare @.rc int
> exec @.rc = msdb.dbo.sp_add_jobschedule
> @.job_id = '68E41CE3-9020-425E-B851-76E758C86E98', -- ID
> of job you create the schedule for
> @.name = N'Sec', -- name of the schedule
> @.enabled = 1, -- enable the schedule for use
> @.freq_type = 4, -- daily frequency
> @.active_start_date = 20030706, -- date from which schedule will be
> active (July 6, 2003)
> @.active_start_time = 0, -- time from which schedule will be
> active (midnight)
> @.freq_interval = 1, -- unused for daily
> @.freq_subday_type = 2, -- seconds
> @.freq_subday_interval = 10, -- every 10 seconds
> @.freq_relative_interval = 0, -- unused for daily
> @.freq_recurrence_factor = 0, -- unused for daily
> @.active_end_date = 99991231, -- date which schedule becomes
> inactive (Dec. 31, 9999)
> @.active_end_time = 235959 -- time which schedule becomes
> inactive (23:59:59)
> if (@.@.error <> 0 or @.rc <> 0) raiserror('Error creating job schedule', 1,
> 16)
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:70D44BF7-689E-4ADF-9FE6-F9570C13F066@.microsoft.com...
>
>
|||Hi
No , there is no option in EM.
"farshad" <farshad@.discussions.microsoft.com> wrote in message
news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...[vbcol=seagreen]
> Thanks for the reply but I was wondering if there is an option in the
> enterprise window for setting the schedule to seconds rather than minutes.
> "Uri Dimant" wrote:
5E-B851-76E758C86E98', -- ID[vbcol=seagreen]
be[vbcol=seagreen]
be[vbcol=seagreen]
1,[vbcol=seagreen]
|||Thanks
"Uri Dimant" wrote:
> Hi
> No , there is no option in EM.
>
> "farshad" <farshad@.discussions.microsoft.com> wrote in message
> news:A53AD0DE-1378-43CA-90F6-3DC0A5D181FA@.microsoft.com...
> 5E-B851-76E758C86E98', -- ID
> be
> be
> 1,
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment