Microsoft MVP Logo

    <p><em>My time for a </em><a href="http://en.wikipedia.org/wiki/Mea_Culpa"><em>mea culpa</em></a><em>... but hey, at least I'm coming clean! Been meaning to post this for quite a while...</em></p>
    <p>A while back I <a href="http://www.andrewconnell.com/blog/MOSS-Timer-Jobs-Create-Your-Own">blogged about how to create custom tasks in WSS v3</a>. In that post, <a href="http://www.andrewconnell.com/Creating-Custom-SharePoint-Timer-Jobs">and the subsequent article that provided more detail</a>, I showed how you can use a WSS Feature to register the task upon activation... however I had a little oversight. The Feature was visible, meaning you could activate it from within the Site Settings &raquo; Site Collection Features page. Many tried to do this, but as you will see from the comments at the end of the article, ran into problems when they tried to activate the Feature. This is actually a good thing... because you shouldn't be able to do this! </p>
    <p>Why? When activated via the Web interface, the Feature is activated using the application pool identity, which doesn't [<em>and shouldn't</em>] have sufficient rights to the farm's configuration DB where the specific stored procedure resides that is called when you register a job. So what was everyone's fix? Grant it rights... ooo... that's not good! What I should have done was make that feature non-visible and force you to be logged in with an account that has sufficient rights to the farm's configuration DB when activating the Feature. A small oversight, but one that confused quite a few people.</p>
    <p>The code in the post and article have since been updated for future hits.</p>
    <p>[<strong><font color="#ff0000">Update 4/8/2008 @ 12a</font></strong>] A Visual How-To I created on the subject of creating custom timer jobs was recently posted on MSDN. <a href="http://www.andrewconnell.com/blog/Two-new-WSS-30-MSDN-Visual-How-Tos-Published">You can get more info here</a>.</p>
    <p>[<font color="#ff0000"><strong>Update 5/1/2008 @ 730a</strong></font>] There is now an in-depth article on MSDN about creating custom timer jobs. If you have trouble please check this out as there is a ton of additional info here. <a href="http://www.andrewconnell.com/blog/More-help-on-creating-custom-timer-jobs-and-a-useful-SharePoint-site-warmup-tool">Post: More Help on Creating Custom Timer Jobs</a></p>
    <div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:1fc7b634-6e5d-4db7-8658-085345007662" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px">Technorati tags: <a rel="tag" href="http://technorati.com/tags/sharepoint">sharepoint</a>, <a rel="tag" href="http://technorati.com/tags/wss">wss</a>, <a rel="tag" href="http://technorati.com/tags/timer%20job">timer job</a></div>
Comments powered by Disqus