Domanda

I have a timer job that run multiple times, even though I have specified the SPJobLockType to SPJobLockType.Job.

My constcrutors look like this

public TimerJobTest()
{
}

public TimerJobTest(string jobName, SPService service) : base(jobName, service, null, SPJobLockType.Job)
{
    Title = TimerJobTitle;
}

public TimerJobTest(string jobName, SPWebApplication webapp) : base(jobName, webapp, null, SPJobLockType.Job)
{
    Title = TimerJobTitle;
}

The timer job is provisioned via a feature at Web-Application level. On Monitoring, under Review Job Definitions in Central Administration, I can see that there is only one instance of the timer job. But, the Execute function is run at least 4 times.

Any ideas what else I could change in order to make it run once?

È stato utile?

Soluzione

Wanted to mark Amal Hasihims post as answer, but it is not possible. There was an update issue. When I retracted and re-added the timer job wit SPLockTypeJob.Job it only ran once.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top