I have been tasked with writing a couple custom SPJobDefinitions and have 2 blocking questions regarding its implementation.

What constructor should I use?

I have noticed two that I can use. One using an SPWebApplication and one using an SPService. Im leaning towards SPService as SPWebApplication implies its fairly specific.

How do I tie it into central admin?

I know I am to use a feature, and have the workings of one, but am stuck on how to get either the service application or the web application required for the constructors.

Does anyone have any advice for the novice timer job developer?

Thanks in advance.

1 Answer 1


I think this tutorial on MSDN could help you: http://msdn.microsoft.com/en-us/library/hh528519(v=office.14).aspx

It goes from information about timer jobs, implementation to deployment and testing.

After deploying timer job you should re-enable feature and restart timer service:

Disable-SPFeature #feature name with timer job
net stop sptimerv4

Enable-SPFeature #feature name with timer job
net start sptimerv4

There could be issue with starting timer job manually, so it's better let it start automaticaly.

When you debug timer job don't forget to attach process to OWSTIMER instead of w3wp.

Your Answer

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