Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Agent Recurring Schedule End Event


SQL Agent Recurring Schedule End Event

Author
Message
bob.shirley 7875
bob.shirley 7875
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 64
What actually causes a SQL Agent job to run for the last time within the daily frequency settings?

I ask this because I have a daily job that does not always start. It is scheduled to run daily starting at 3:30 PM, repeat every 6 hrs, ending at 10:00 AM. That was intended to cause four executions during an 18 hour period (3:30 PM, 9:30 PM, 3:30 AM and 9:30 AM). Start time of 3:30 PM was selected because it is before SOD at the most Eastern site.

I have stopped that job and replaced it today with a similar job staring at 3:30 AM and ending at 10:00 PM, to see if midnight crossing is a problem. However, I have several other jobs that cross midnight without a problem and am wondering if the issue is interference between starting at, occurs every and ending at arguments.

The one difference I see with the job that does not always start is the daily starting time and the first repetition past the ending time are the same. I am wondering if reoccurrences do not end until the first repetition time after the ending time.

If I continue to experience missed starts, my next attempt will be to change the occurrence to ever 5 hrs and 45 minutes. That will provide a one hour gap between the first occurrence following ending time and the next start time.
Query Shepherd
Query Shepherd
SSC-Enthusiastic
SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)SSC-Enthusiastic (134 reputation)

Group: General Forum Members
Points: 134 Visits: 454
AFAIK if the job is already running, it will not start again. If you need this behaviour you have to write a service on your own.

Greetz
Query Shepherd
bob.shirley 7875
bob.shirley 7875
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 64
Yes, I know a job won't start when it is already running. That is why I asked “when does a SQL Agent job with multiple occurrences end”.

The single job I constructed should have worked, provided SQL Agent detected the fourth occurrence should be the last and ended the job at that point in time. My guess is that the job does not end until the first occurrence after the ending time.

On 2/12, I replaced the original job with two jobs, one AM and one PM job. These jobs have worked so far and I think will solve the problem.
Makarand Mohandas
Makarand Mohandas
SSC Veteran
SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)

Group: General Forum Members
Points: 285 Visits: 99
cant you just simply create 2 schedules, 1 for the PM hours and 2nd for the AM hours. each one of them can have its own occurs overy 'x' hours, starting and its time and ending at another time.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search