Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I was curious about if the timer jobs execution interval is like 3 minutes and the execution of the code is like 10 minutes, what happens internally.

I'm sure that the timerjob execution is not interrupted but how does sharepoint acts to this situation.

I hope, I've explained my self clearly. Thanks in advance.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It will run till the job's Execute method finishes (or errors out :-D). If the runtime is longer than the interval specified, SharePoint will skip that next interval, meaning it'll check for running instances when it's time to start the job again. If there's still a running instance, no new instance will be started.

A good example that shows this behavior are the Alerting timerjobs. These Web Application scoped (out of the box) jobs are scheduled to run every 5 minutes.

Seeing as they are web app scoped, if that webapp would contain a huge amount of sites, lists, users etc, there could potentially be an exponential amount of alerts (user X items added X lists X sites...). So if they were to run strictly by schedule every 5 minutes, you could get alerts maybe 2, 3 times. So the job is just not fired while an instance is still running.

share|improve this answer

As I tested, the execution of the timer job will run to the end of its code. And the timer job will wait the execution to complete.

share|improve this answer
    
So, the interval is starts after the execution completed, right? Or is there a queue that sp holds? Like, since 10mins passed, the job should've ran 3 times in that period and after the first execution completes the job will run two more times and therefore goes for an infinite loop? I'm sure that will not happen but I said, I'm just curious. Anyone with the detailed knowledge is highly appreciated! –  Beytan Kurt Feb 8 '12 at 11:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.