Question

I'm curious whether or not all timer jobs will always run under the same farm service account, i.e. SPFarm.Local.DefaultServiceAccount as specified at installation. For example, if farm service account specified at installation is domain\FarmServiceAccount, will all timer jobs use this account to execute their code? Would this apply to all timer jobs in web application level, or farm level?

The only situation I can think of that this will not be true is obviously if farm service account is changed to something else post-installation. Is this correct?

Background: I'd like to programatically retrieve timer service account name and store it somewhere. I'd like to make sure that this name is equal to SPFarm.Local.DefaultServiceAccount for all timer jobs.

Was it helpful?

Solution

The sure way will be to get SPFarm.Local.TimerService.ProcessIdentity.UserName

OTHER TIPS

All timer jobs will run under the context of Sharepoint 2010 timerservice context.

Timer service Context

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top