If you schedule a SQL Server job to run every X number of minutes, and it does not finish the previous call before the # of minutes is up, will it skip the run since it is already running, or will it run two instances of the job doing the same steps?
Asked
Active
Viewed 3.2k times
3 Answers
96
The SQL Server agent checks whether the job is already running before starting a new iteration. If you have long running job and its schedule comes up, it would be skipped until the next interval.
You can try this for yourself. If you try to start a job that's already running, you will get an error to that effect.

Jose Basilio
- 50,714
- 13
- 121
- 117
-
Awesome, that's exactly what I wanted to know. I have an e-mail checker that sometimes takes a while to download large e-mails. Because it runs every minute, it's -very- important that a second instance of the job isn't started if the first one hasn't completed yet. – Daniel T. Dec 08 '09 at 03:47
-
Is there any way to achieve this, I mean avoid the skip and start another instance of the job? Or just could be done creating another SQL Job? Thanks – Ivan Rascon Jul 12 '17 at 20:49
-
@Jose, question. I don't want SQL server saying it's a fault or error. Just skipped. how can I ensure that is so? Thanks – arcee123 Jul 16 '18 at 20:12
2
Which version of SQL Server are you using? This seems like a pretty easy thing to test. Set up a job with a WAITFOR in it that inserts a single row into a table and set up the job to run twice in quick succession (shorter than the WAITFOR DELAY).
When running such a test in SQL Server 2005 it skipped the run that was overlapped.

Tom H
- 46,766
- 14
- 87
- 128
-
2I was contemplating doing this- but it seemed easier to google it and.. voila – Paul Jun 28 '16 at 09:55