1

I have a custom timer job that I create an instance of by activating a web application scoped feature in Central Admin. In the farm, the Central Admin box is an application server. What I'm finding is that the timer job is only scheduled to run on the application server, and not on the WFE. I used the "Job History" page in Central Admin to determine this.

Note that I am already setting the LockType to "SPJobLockType.None" in the constructor for my timer job.

var job = new CopyConfigJob(webApp);

The constructor for my custom timer job looks like:

public CopyConfigJob(SPWebApplication webApp) :
   base(JobNamePrefix + Guid.NewGuid().ToString(), webApp, null, SPJobLockType.None)
{
   Title = JobTitle;
}
1
  • Please add the code you're using. Commented Aug 4, 2011 at 16:41

1 Answer 1

3

Make sure you haven't set DeploymentServerType="ApplicationServer" in your Solution Manifest file. You can also go to the WFE and see if the job-related assembly(s) have been GAC'd.

Can you provide the line of code you're using when you create an instance of the job...i.e:

MyTimerJob job = new MyTimerJob("jobname", webApp, null, SPJobLockType.None);
1
  • I was not deploying the solution to the WFE server. Your comment made me notice that the assembly containing the job code was not in the GAC on the WFE. Of course the job can't run there without the code! Thanks for your help.
    – JasonV
    Commented Aug 4, 2011 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.