I've created a custom timer job with the following sample
http://dotnetfinder.wordpress.com/2010/07/24/creatingcustomsharepointtimerjob2010/
The feature is site scoped. In the feature receiver on the FeatureActivated event I create the timer job and on the FeatureDeactivating event I delete the timer job.
The problem is that when I activate the feature with powershell everything is working fine but if I try to activate the feature in the browser it won't activate.
After a little debugging, I know it throws several security exceptions in the feature receiver. Is there a way to run the code with a higher privileged account, or should a feature that creates a timer job always be activated with powershell?
Thanks in advance! :)