views:

26

answers:

1

I have a situation where I need to move some huge data using a timer job. But I can't do this using OneTimeSchedule as it may impact the performance of my sharepoint application during the peak hours.

I want to make it run for maximum of 5 hours a day starting at 20:00 everyday.

What is the best way?

+3  A: 

You could create a SharePoint timer job. Make the timer job run every day at a given time. Inside the job you use a System.Threading.Timer to stop the main loop after five hours and exit the job. Within the main loop you move the data - you should make sure that you somehow persist the state of that main loop. So in case the job crashes or a severe error occurs it can continue processing where it stopped. I hope it helps...

Bernd
Bump.. here is a link to help with this: http://msdn.microsoft.com/en-us/library/cc406686(office.12).aspx
Zeb