Re: job execution order
From: Igor Solodovnikov (siv_at_helpco.kiev.ua)
Date: 04/20/04
- Next message: R. Z.: "EXEC statement inside cursor iteration (@@fetch_status =0)"
- Previous message: Chris Whitehead: "VB - Stored Procs vs queries"
- In reply to: Cherdian Lim: "Re: job execution order"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Apr 2004 14:48:07 +0300
Thank you for answer. I think you understand me right. But I will try to
give more information.
First job has schedule created with following call:
EXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID, @name
= N'BackupOnAgentStart', @enabled = 1, @freq_type = 64
it executes only when SQL Server Agent starts.
Second job has schedule created with following call:
EXECUTE @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id = @JobID, @name
= N'LogTime', @enabled = 1, @freq_type = 4, @active_start_date = 20030421,
@active_start_time = 53000, @freq_interval = 1, @freq_subday_type = 8,
@freq_subday_interval = 2, @freq_relative_interval = 0,
@freq_recurrence_factor = 0, @active_end_date = 99991231, @active_end_time =
235959
- this schedule executes every 2 hours starting from 5:30 (that is it fires
at 5:30, 7:30, 9:30, 11:30 .... 23:30).
My question is: what if SQL Server Agent starts at point of time near to
5:30 or 7:30 or 9:30 .... ? My intention is to never execute second job
before first job executed.
"Cherdian Lim" <limcy@infolink.co.id> wrote in message
news:OjhhAJpJEHA.2884@TK2MSFTNGP12.phx.gbl...
> I'm not sure I understand well the situation. If you can be more
> specific, that will help! however, with a lot of assumption on my side,
> I think there's no guarantee that the first job will be executed before
> the second. It depends on the thread scheduling.
>
> Igor Solodovnikov wrote:
>
> > On Fri, 16 Apr 2004 16:40:15 +0300, Igor Solodovnikov
> > <siv@helpco.kiev.ua> wrote:
> >
> >> I have two jobs. One has schedule which fires when Agent stars.
> >> Another has
> >> schedule which fires once per hour.
> >> Is it guaranteed that first job will be executed before second job
> >> when SQL
> >> server starts?
> >>
> >
> > Is my question so hard to answer? Or is it hard to understand it?
>
- Next message: R. Z.: "EXEC statement inside cursor iteration (@@fetch_status =0)"
- Previous message: Chris Whitehead: "VB - Stored Procs vs queries"
- In reply to: Cherdian Lim: "Re: job execution order"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|