Wednesday, August 13, 2014

Timer Job Fires Multiple Times

This happens because the way you call your timer job constructor. You should use SPJobLockType.Job NOT SPJobLockType.ContentDatabase.  Constructor Code should look like the following

Keywords: SharePoint, SharePoint 2010, SharePoint 2013, Timer Jobs

public ConventusMDToAXTimerJob(): base()
{
}

public ConventusMDToAXTimerJob(string jobName, SPWebApplication webApplication)
:base(jobName, webApplication, null, SPJobLockType.Job)
{
    this.Title = JOB_NAME;
}

Problem solved. Enjoy

No comments:

Post a Comment