IntroductionSharePoint Timer Jobs are the heartbeat of any SharePoint Farm. They perform many important background tasks and generally consume substantial amounts of memory. Hence it becomes important to understand the ins and outs of these jobs - their location, scope, security aspects, customization aspects and performance related aspects. The SharePoint Timer Job Service is a windows service for The SharePoint Server. A Windows service is a long-running executable that runs in its own Windows session and performs specific functions that are designed ot not require user intervention. This service should not be confused with other SharePoint Service Applications like Excel Service Application, Word Service Application, Business Data Connectivity Service and so on. Those are web services as shown below where-as the SPTimer Job service is a windows service. Physical Location The SharePoint timer job process - OWSTimer.exe - runs on all servers on a SharePoint farm. It does not have a SharePoint Admin GUI from where it can be stopped. We need to locate the Windows service and stop it manually on each server. Each timer job is either associated with a SharePoint Service Application or a SharePoint Web Application. If the service is provisioned for a web application, then only then will the related timer jobs be executed. A job can also be associated with a specific server and if the service is provisioned on that server then the job will run. The picture below depicts this.Preferred Web Server for Timer JobsUsing a new option in SharePoint 2010 Central Administration, we can now set the preferred server where the timer service runs. To do this, click in the Manage Content Databases menu of the Application Management section of SharePoint Central Administration. Then click on the content database and scroll down to the setting for The Preferred Server for Timer Jobs. The web server can be chosen from the one's available in the farm as shown below. In the custom timer job we can also specify the server on which the job should run. State machine workflows are saved in the content database. SharePoint executes workflow instances in one of two places depending on the last action. If the last action in the workflow was waiting on a user input, the workflow continues to execute on the Web front end where the user completed that input. If the workflow is continued from a delay timer or from an event being received elsewhere, it executes within the timer service. If the preferred server is mentioned – it executes on that server.Privileges of OWSTimer.exe and W3wp.exeThe SharePoint timer job process - OWSTimer.exe - runs under the full trust execution model under the service account setup for it. This typically has higher permission levels than the IIS worker process - w3wp.exe. The application pool identity is essentially what the ASP .Net code of the portal site will be executing as. The Farm Account, which is used for the SharePoint 2010 Timer service and the Central Administration site, is highly privileged and should not be used for other services on any computers in the server farm. The account used by the Timer service should have access to the Content Database. We cannot elevate privileges in a SharePoint job so we are restricted to the permissions granted to the OWSTimer service account.Logical Scope of actionAll timer jobs have a scope of action - an object type upon which they are intended to work. This scope are reflected in the three values of the SPJobLockType enum: Job, None, and ContentDatabase.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: