x

Multiple executions of SQL Agent Job

If I have a job in SQL Server 2005/2008, and it is scheduled to run every minute, what happens if one of the executions takes 75 seconds? Does the agent miss an execution or do I have two copies executing simultaneously?

more ▼

asked Oct 26 '09 at 03:35 PM in Default

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 76 79 82

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

SQL Server will only run one instance of a job at a time. When a job runs past its next scheduled start time, that execution is skipped and the job picks up again at its regularly scheduled time.

more ▼

answered Oct 26 '09 at 04:30 PM

KenJ gravatar image

KenJ
19.1k 1 3 11

Ken, have you ever, per chance, ever appeared on a popular TV trivia game show?
Feb 14 '10 at 04:29 PM Scot Hauder
Not to my knowledge. If you've seen me on one, please let me know.
Feb 16 '10 at 01:04 AM KenJ
I knew Ken Jennings was in IT before appearing on Jeopardy, he once drew a face on the monitor similar to your avatar but he is from UT not NE..so I thought I'd maybe there was a chance...
Feb 16 '10 at 10:25 PM Scot Hauder
(comments are locked)
10|1200 characters needed characters left

When scheduling a job, you indicate a start date/time and then a recurrence frequency. If it is scheduled to run every minute, it will attempt to run at the beginning of each minute, but only if it is not already running. If it is running, it will start again at the beginning of the next minute after it stops.

more ▼

answered Oct 26 '09 at 04:20 PM

Tom Staab gravatar image

Tom Staab
5.8k 6 8 10

(comments are locked)
10|1200 characters needed characters left

The next execution would be skipped.

more ▼

answered Oct 26 '09 at 05:06 PM

Jay Bonk gravatar image

Jay Bonk
1.4k 2

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1936
x1816
x86
x85

asked: Oct 26 '09 at 03:35 PM

Seen: 3338 times

Last Updated: Oct 26 '09 at 03:35 PM