Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have run into a problem several times now where I have developed a custom timer job, and I want my site collection administrators to manage the schedule of this job with a custom application page but I keep running into security related obstacles.

Since timerjobs are child objects of SPWebApplication, they are stored in the config database. If you have set up your farm properly in such a way that the App pool user for your content web application does not have write access to the Config database, you can't create new TimerJobDefinitions from code that runs in your content web app. A bad workaround/hack would be to raise the database permissions for your app pool user on the config database. A better approach would be to move the schedule admin page into Central Admin, because the Central Admin app pool account can write to the config database But then we lose the whole point - I want my site collection administrators to be able to manage the schedule!

The only alternative solution I can think of is to have another timerjob that polls some kind of queue (for example a sharepoint list in my site collection) for new timerjobs to create, and creates it if an item has been added to that queue from within the content web app using the custom schedule admin page.

My question is, is there another way that is both efficient and elegant?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

this is basically the same question as the Automating Site Collection question. You're on one solution, using a queue. Another approach could be having a web service in CA that you can call from your web apps.

/WW

share|improve this answer
    
I like the webservice idea, thanks! –  Jaap Vossers Nov 10 '09 at 11:35
    
I like that approach also, nice and elegant –  Wictor Wilen MCA MCM MVP Nov 10 '09 at 15:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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