3

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?

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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