Wednesday, July 25, 2012

SharePoint Timer Job targeted at specific web application

I have a work around for this.

If any one knows the solution please update me @  rajesh.chennupati@gmail.com


basically features defined with some scope will appear in all the scope specific area

I means ( scope with web, will be visible in all site features
                scope with site, will be visible in all site collection features.......)

(we can avoid this by changing the feature's Hidden property to TRUE)


in the same way timerjobs' scope may be web application. So the same feature appears in all webapplications.

The problem is :- if feature's scope is webapplication/Farm then by default the feature is activated THOUGH YOU SELECT "NO ACTIVATION" in project properties.

It means the feature is activated when you deploy the sharepoint solution, ultimately the timerjob feature is activated and is called from all the webapplications in the farm.

This is not the required result.

So we have to deactivate the feature from the remaining webapplications apart from the required one.

If you have many web applications in your farm then it's tedious to deactivate.

The solution is:- Goto the feature where timerjob is registered with scope web application->  then goto properties (click F4 when you open the feature). Then set "Activate On Default" property to False.


This work around solved my problem.



No comments:

Post a Comment