«

»

Sep 21

SharePoint 2010 Central Administration – Timer Jobs showing incorrect percentage

In the SharePoint 2010 Central Administration – Running Jobs were showing with an incorrect percentage (half what it should have been).

Debugging showed that the job was running twice.  Searching for why TimerJobs might be running more than once I found that the job’s Lock Type is important.  Could find no documentation to support my theory below.

  • The Percentage complete reported in “Central Administration” –> “Running Jobs” is the value set via UpdateProgress (in my code) divided by the number of Content Databases in the WebApp.

 
Turned out we had an orphan Content Database, which is why the job was running twice.

The Job Lock type of our job is set to SPJobLockType.ContentDatabaseJob, if you want the code to run ONLY once use SPJobLockType.Job

See documentation on MSDN for all possible values of this enumeration.

Deleting the orphan Content Database solved my issue.

 1,459 total views,  1 views today

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>