question

Steve Jones - Editor avatar image
Steve Jones - Editor asked

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?

sql-server-2008sql-server-2005sql-agentjob
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image
KenJ answered

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.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tom Staab avatar image
Tom Staab answered

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.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jay Bonk avatar image
Jay Bonk answered

The next execution would be skipped.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.