Re: job execution order

From: Igor Solodovnikov (siv_at_helpco.kiev.ua)
Date: 04/20/04


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?
>



Relevant Pages

  • Re: How to check status of scheduled job
    ... Then, schedule that ... app to run. ... There is a dependency with this, the second job cannot start ... until the first job finishes running. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: job execution order
    ... I think there's no guarantee that the first job will be executed before ... One has schedule which fires when Agent stars. ... >> Is it guaranteed that first job will be executed before second job ...
    (microsoft.public.sqlserver.programming)
  • Follow-up query on 1099Misc confusion
    ... either a schedule E, Schedule C, or Form 4835, none of which seems ... (She plans not to itemize and just take the standard deduction) ... her first job, doing the computer work at home which she often does and then ...
    (misc.taxes)
  • HELP: Preventing concurrent jobs from using the same input file.
    ... The input and output files are stored as ... GDGs. ... I'm of the understanding that if a second job is started while the ... already been used by the first job. ...
    (bit.listserv.ibm-main)
  • Re: HELP - Preventing access to input files for two concurrent jobs.
    ... The input and output files are stored as ... > GDGs. ... > first is still running that the second job will wait to use the file ... > already been used by the first job. ...
    (comp.lang.cobol)

Quantcast