SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Question about job scheduling


Question about job scheduling

Author
Message
andegre
andegre
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1119 Visits: 460
I have a job that I want to run every 20 minutes (because it takes about 15 minutes to run). When I schedule it, it shows that the job will run at x time (let's say 7:45), the job takes about 15 minutes so it should get done at about 8:00, but the next job run says it's going to be 8:20. Why doesn't it say the next job run will be 8:05? Isn't that particular job schedule supposed to go based on the start time of the job, not the start and end time?
andegre
andegre
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1119 Visits: 460
BTW - I found this documentation about the job schedule:

[ @freq_subday_interval = ] freq_subday_interval
The number of freq_subday_type periods to occur between each execution of a job. freq_subday_intervalis int, with a default of 0. freq_subday_interval is ignored in those cases where freq_subday_type is equal to 1.

So does this mean that when the job has completed that it calculates that interval?
Adiga
Adiga
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5922 Visits: 21012
[b]When I schedule it, it shows that the job will run at x time (let's say 7:45), the job takes about 15 minutes so it should get done at about 8:00, but the next job run says it's going to be 8:20.


When the job states that the next run is at 8:20, at that time what was the status of the job? Was it executing?

Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
andegre
andegre
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1119 Visits: 460
Adiga (11/1/2010)
[b]When I schedule it, it shows that the job will run at x time (let's say 7:45), the job takes about 15 minutes so it should get done at about 8:00, but the next job run says it's going to be 8:20.


When the job states that the next run is at 8:20, at that time what was the status of the job? Was it executing?


It had just completed (so it calculated 8:00 + 20 minute sub-day frequency)
andegre
andegre
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1119 Visits: 460
Ok, now it's doing it every 20 minutes from the start time like I wanted it to...I'm confused.
TheSQLGuru
TheSQLGuru
SSC-Dedicated
SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)SSC-Dedicated (30K reputation)

Group: General Forum Members
Points: 30805 Visits: 8668
I hope you understand that if your job takes > 20 minutes to complete you will skip any 'overlapped' executions of the job.

Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
andegre
andegre
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1119 Visits: 460
TheSQLGuru (11/2/2010)
I hope you understand that if your job takes > 20 minutes to complete you will skip any 'overlapped' executions of the job.


Yep.

Right now, it's averaging about 12 minutes and I have the schedule setup to run every 15 minutes now. Haven't missed a 15 minute increment yet, and have run 94 times so far (it's a conversion job).

It's not a big deal though if it goes beyond the 15 minutes.

Thanks
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