I need some logical advice for setting progress in custom long running timer job (more than half an hour).
I have loop for more than 50k items in timer job Execute.
How to elegant update progress bar every minute or two using SPJobDefinition.UpdateProgress(int percentage)
method?
I don't want update progress for each iteration in for-loop (too many progress updates).
sample code
SPListItemCollection collListItems = list.GetItems();
for (var i = 0; i < collListItems.Count; i++)
{
//code
}
Make 10 or 20 updates then. I mean something like that:
I think this would be more fair updates than periodical.