I'm busy writing / debugging my first custom timer job in Sharepoint 2010.

What is working so far:

  1. The timer job installs
  2. The timer job can start

What's not working:

  1. Nothing else seems to be working. It just runs indefinitely without any results or progress.

My execute method so far:

public override void Execute(Guid contentDbId)
            Tasks.TaskMan taskMan = new Tasks.TaskMan();

Task man task should take about 5 minutes to complete. Basically what it will do is insert items to a list and to a taxonomy term store. The code tested in a console application works.

What could the problem be, I've followed the sample code on timer jobs down to the last letter, checked and rechecked, but it seems the job just isn't working for some reason.

Thanks in advance


Changed my method to now be:

public override void Execute(Guid contentDbId)

Same problem , seems to run indefinitely.


Possibly to do with user permissions under which your TaskMan task operates?

Your console app would run under the rights of you logged in, whereas the timer job runs under whatever OWSTIMER operates.

Something permissions related could be causing your TaskMan task to halt for some reason.

  • @James, check update, surely this new Execute method shouldn't require any advanced permissions? – user879 Jan 11 '11 at 21:38
  • Does it stick on 1%, by any chance? – James Love Jan 11 '11 at 21:51
  • Ok thanks you were right , applied to permissions. But I needed to restart the timer service manually to get real debugging. otherwise it seemed to execute old code for some reason. – user879 Jan 11 '11 at 22:17
  • correct, this reason is called the GAC :) – Jaap Vossers Jan 12 '11 at 15:36
  1. Attach debugger to owstimer.exe
  2. step into UpdateProgress, step, step, step
  3. find bug
  • +1 for attaching debugger to the owstimer.exe ;) – Falak Mahmood Jan 12 '11 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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