SharePoint timer jobs not getting invoked

ashwnacharya picture ashwnacharya · Aug 25, 2009 · Viewed 7k times · Source

I have a timer job which has been deployed to a server with multiple Web front ends.

  • This timer job reads it's configuration from a Hierarchical Object Store.
  • This timer job is scheduled to run daily on the server.

But the problem is that this timer job is not getting invoked daily. I have implemented event logging in the timer job's Execute() method, but I dont see any logs being generated.

  • Any ideas as to what could cause a timer job to be not picked up for execution by the SharePoint Timer Service? How can I troubleshoot this problem?

  • Are there any "gotcha"s for running timer jobs in servers from multiple front ends? Will the timer job get execute in all the web front ends, or any one of them arbitarily? How to know which machine will have my event logs?

  • This might be a stupid question, but does having multiple front ends for load balancing affect the way Hierarchical Object Stores behave?

EDIT:

One of the commenters, Sean McDounough, (Thanks Sean!! ) made a very good point that:

"whether or not the timer job runs on all WFEs will be a function of the SPJobLockType enum value you specified in the constructor. Using a value of "None" means that the job will run on all WFEs."

Now, my timer job is responsible for sending periodic mails to a list of users. Currently it is marked as SPJobLockType.Job"

  • If I change this to SPJobLockType.None, does this mean that my timer job will be executed in all the WFEs separately? (THis is not desired, it will spam all the users with multiple emails)

  • Or does it mean that the timer job will execute in any one of the WFEs, arbitarily?

Answer

Lars Fastrup picture Lars Fastrup · Aug 25, 2009

Try restarting the SharePoint timer service from the command-line using NET STOP SPTIMERV3 followed by a NET START SPTIMERV3. My guess is that the timer service is running with an older version of your .NET assembly. The timer service does not automatically reload assemblies when you upgrade the WSP solution.