Tuesday, February 3, 2015

SharePoint 2013 Review: The Timer Service Recycle Job

Introduction

This posting consolidates notes and references regarding the SharePoint Timer Service Job.  Additional technical details on this job and the Timer service can be found in the references listed below.

Discussion

This job is default configured to run at 6:00 AM daily.  To view its configuration, go: CA > Monitoring > Timer Jobs > Review job definitions > Timer Service Recycle:


The job has two primary phases: a warning phase during which no new jobs are launched and the actual reset phase, during which the Timer Service is stopped and started.  The warning phase lasts for about 10 minutes and the reset phase takes less than a second.  To view the configuration for the warning phase, go: CA > SharePoint Management Shell (Elevated) > (get-spfarm).timerservice.  You'll see it listed as RecycleWarningMinutes.  By default, this is set to 10 minutes.


The affect of this timer job can be seen by reviewing the Search Crawl Reports CPU and Memory Load report.  To view this report, go: CA: General Application Settings > Search > Farm Search Administration > Search Service > Crawl Health Reports > CPU And Memory Load.  This first graph shows the report over about a 24 hour period.

This next graph zooms in on the period during which the recycle job is being executed.


The timer service stop and start is logged to a farm's application server System log as 7036 Information events:
Log Name:      System
Source:        Service Control Manager
Date:          2/3/2015 6:11:02 AM
Event ID:      7036
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      [farm application server]
Description:
The SharePoint Timer Service service entered the stopped state.
Event Xml:
...
followed by
Log Name:      System
Source:        Service Control Manager
Date:          2/3/2015 6:11:03 AM
Event ID:      7036
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      [farm application server]
Description:
The SharePoint Timer Service service entered the running state.
Event Xml:
...
Correspondingly, you'll see this event in the farm application server's Security log indicating that a Timer Service process has been launched:
Log Name:      Security
Source:        Microsoft-Windows-Security-Auditing
Date:          2/3/2015 6:11:03 AM
Event ID:      4688
Task Category: Process Creation
Level:         Information
Keywords:      Audit Success
User:          N/A
Computer:      [farm application server]
Description:
A new process has been created.

Subject:
 Security ID:  SYSTEM
 Account Name:  [farm application server]
 Account Domain:  [domain]
 Logon ID:  0x3E7

Process Information:
 New Process ID:  0x4ce8
 New Process Name: C:\Program Files\Common Files\microsoft 
                                shared\Web Server 
                                Extensions\15\BIN\OWSTIMER.EXE
 Token Elevation Type: TokenElevationTypeDefault (1)
 Creator Process ID: 0x314
...



References
  1. The SharePoint Timer Service
  2. The SharePoint Administration Service and SPAdministrationServiceJobDefinition
  3. The Timer Recycle Job (job-timer-recycle)
  4. Recycling SharePoint’s OWSTIMER (Net Stop / Start SPTimerV4), Daniel Webster, Summit 7 Systems
  5. The timer service failed to recycle (SharePoint 2013), TechNet
  6. Timer job reference (SharePoint 2013)
  7. Get-SPTimerJob
  8. Windows PowerShell Scripting - Format-Table (FT)
  9. PowerShell: get running timer jobs
  10. View timer job status in SharePoint 2013
Notes
  • To generate a list of all timer jobs, use Get-SPTimerJob.
  • To generate a sorted list of these by name and ID, use: Get-SPTimerJob | Sort-Object name, id | ft name, id.
  • To filter this list by a keyword, use: Get-SPTimerJob | where { $_.name -like “*recycle*” } | Sort-Object name, id | ft name, id.
  • To get a specific timer job, use: Get-SPTimerJob -Identity <GUID>.
  • To get a list of the available methods and properties for a timer job, use: Get-SPTimerJob -Identity <GUID> | Get-Member.

No comments: