3

I created Timer Job, and create definition on Feature Activated. I have question about schedule.

If I use Minute Schedule like this:

SPMinuteSchedule schedule = new SPMinuteSchedule();
schedule.BeginSecond = 0;
schedule.EndSecond = 59;

does that mean, that schedule always starts on 0th second and stops at 59th second of the same minute? What if I have operation, that needs more than 1 minute to finish? Will it be terminated? And if yes, how can I extend running time to eg. 5 minutes?

3

This post have details. The info extract from the Post

Notice how the schedule is set for the timer job. The SPMinuteSchedule.BeginSecond property and the SPMinuteSchedule.EndSecond property specify a start window of execution. The SharePoint Timer service starts the timer job at a random time between the BeginSecond property and the EndSecond property. This aspect of the timer service is designed for expensive jobs that execute on all servers in the farm. If all the jobs started at the same time, it could place an unwanted heavy load on the farm. The randomization helps spread the load out across the farm.

So it not terminate the job. It starts between this time span from 0 to 59 in your case.

1

No, the schedule starts between 0 seconds and 59 seconds into the schedule and runs until it's finished. This is already answered here:

TimerJob development, what does the EndSecond property of a SPMinuteSchedule mean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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