0

I have a custom Timer Job created in Sharepoint 2010. After it runs, the Status shows "succeeded", but it actually doesn't execute the code.

I have managed to debug it, and I saw that it enters in the "empty" constructor several times:

public MyTimerJob() : base(){}

and then it stops, without entering in the constructor with the parameters:

 public MyTimerJob(string name, SPWebApplication webApp,SPServer server, SPJobLockType lockType)
          : base(name, webApp, server, lockType) { }

and avoiding the Exectute method:

public override void Execute(Guid targetInstanceId)
{
  mycode();
}

Any suggestions?

I have already

  • restarted the SharePoint Timer Service from the Service Tool
  • restarted SPTimerV4 from the console
  • checked the Application Pool
  • killed the OWSTIMER.EXE
  • checked the rights of the user which is running the Timer Job
  • tried to deactivate/activate the feature
Alessandra Amosso
  • 351
  • 1
  • 4
  • 13
  • 1
    Could you add code with FeatureActivated and FeatureDeactivating logic? Maybe there is some issue there? Here is the msdn support article for this implementation -> https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/hh528518(v%3Doffice.14) Please compare, maybe there is some small error there. – Adam Sep 07 '20 at 21:15
  • Hi Adam! Thanks for your answer, I have solved the issue with the feature, but I still have the TimerJob code not executing..so unfortunately it wasn't related :( – Alessandra Amosso Sep 08 '20 at 14:49

0 Answers0