Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint timer jobs not getting invoked

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?

like image 492
ashwnacharya Avatar asked Aug 25 '09 11:08

ashwnacharya


2 Answers

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.

like image 71
Lars Fastrup Avatar answered Sep 18 '22 00:09

Lars Fastrup


To do this, follow these steps:

  • Stop the Timer service.
  • Click Start, point to Administrative Tools, and then click Services.
  • Right-click Windows SharePoint Services Timer, and then click Stop, or Restart service.

This URL helped me.

like image 25
Joby Cheriyan Avatar answered Sep 21 '22 00:09

Joby Cheriyan