I need to disable a custom timer job when deactivating a feature and must run the timer job on activating the feature in SharePoint 2010. Can you please help me with the code or blogs or pointers.


1 Answer 1


Within your feature receiver you can set the SPJobDefinition property isDisabled to get/set whether it is enabled.

To run the job during activation you call the RunNow method.

Here is a link to the SPJobDefinition Members - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spjobdefinition_members.aspx

Your Answer

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

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