SharePoint 2016 / 2019 – Timer jobs with ContentDatabase lock type do not run

In SharePoint 2016 and 2019, you may find that some timer jobs are not doing what they should. In timer job history, you may see that the timer jobs are running successfully, but they aren’t doing anything. Depending on the timer job, this can be a little difficult to detect. Of the timer jobs affected by this issue, the “Immediate Alerts” and “My Site Instantiation Interactive Request Queue” timer jobs are probably the most visible when they’re not working.

For example, you may have an Alerts issue where no alert emails are being sent. In the SharePoint ULS logs, you might find this:

OWSTIMER.EXE (0x3470) 0x2E7C SharePoint Foundation Timer 7f9q Medium Job definition Microsoft.SharePoint.Administration.SPImmediateAlertsJobDefinition, id 608417f5-208d-4273-8b9c-d1b3c8e87ff6 not applicable, ignoring

Why is it “not applicable”?

There is no server in the farm with the “Application” server role, and / or there is no server in the farm with the “AllowContentDatabaseJobs” property set to true.

For example, you may have servers with the Web-Front-End, Search, and Distributed Cache roles, but no Application role.

At least one server is required to hold the Application role. Reference: https://docs.microsoft.com/en-us/sharepoint/install/planning-for-a-minrole-server-deployment-in-sharepoint-server#minrole-topologies

The Immediate Alerts timer job (and a bunch of other timer jobs, see list below) has a “LockType” of “ContentDatabase”, which means it can only run on a server where the “AllowContentDatabaseJobs” property is set to “True”.

You can check on the value of “AllowContentDatabaseJobs”, along with checking the status of the Timer and Administration services by running the “CheckTimerAndAdminServices.ps1” PowerShell script from my other post here: https://joshroark.com/sharepoint-all-about-one-time-timer-jobs/. In fact, if you have any kind of timer job problem, I’d start with that script, as it will detect and correct a pretty common (instance is offline) Timer service problem.

In order for Content Database jobs like Alerts to work, at least one server in the farm must host the Application role and have its “AllowContentDatabaseJobs” property set to “True”. For example, even if “AllowContentDatabaseJobs” is set to “True” for a server with the Search role, it won’t run the Immediate Alerts timer job because it’s a Search server.

Update 7/21/20: For a similar issue with Timer jobs with “Job” lock type, see my other post here: https://joshroark.com/sharepoint-2016-2019-timer-jobs-with-job-lock-type-do-not-run/

The fix?

Either add a new server to the farm with the “Application” role, or change the role of an existing server to include Application.

Reference: https://docs.microsoft.com/en-us/sharepoint/administration/role-conversion-using-minrole-in-sharepoint-server-2016#how-to-change-a-server-role

Also, make sure your “Application” role servers are set to AllowContentDatabaseJobs. If not, you can set them to run those jobs with PowerShell like this:

$serverName = "YourServerNameHere"
$farm = Get-SPFarm
$TI = $farm.TimerService.Instances | ?{$_.server -match $serverName}
$TI.AllowContentDatabaseJobs = $true
$TI.Update()

What about servers with the “Custom” role?

Server with the custom role should be able to run this type of timer job, as long as their AllowContentDatabaseJobs property is set to “true”, as outlined above.

Here’s a list of all the SharePoint 2016 timer jobs with “ContentDatabase” lock type.

These are the jobs that would be affected by this issue. You can get the list from your own farm like this:

Get-SPTimerJob | ? {$_.locktype -eq "ContentDatabase"} | select displayname | sort displayname

Audit Log Trimming

Bulk workflow task processing

Cell Storage Data Cleanup Timer Job

Change Log

Compliance Dar Processing

Compliance Dar Task House Keeping

Compliance High Priority Policy Processing

Compliance Policy Processing

Content Organizer Processing

Content Type Subscriber

Dead Site Delete

Deferred access control list update job

Delete Upgrade Evaluation Site Collections job

Disk Over Quota Warning

Disk Quota Warning

Document Changed Anti-virus Processing

Document Full Crawl Anti-virus Processing

Document ID assignment job

Document ID enable/disable job

Document Set fields synchronization job

Document Set template update job

Enterprise Metadata site data update

Expiration policy

File Post Processor

Fix Site Storage Metrics

Gradual Site Delete

Hold Processing and Reporting

Immediate Alerts

Information management policy

Large list automatic column index managment job

Migration Job

My Site Host Automatic Upgrade

My Site Instantiation Interactive Request Queue

My Site Instantiation Non-Interactive Request Queue

My Site Second Instantiation Interactive Request Queue

My Sites Automatic Upgrade

Notification Timer Job c02c63c2-12d8-4ec0-b678-f05c7e00570e

Persisted Navigation Term Set Synchronization

Recycle Bin

Repair Orphan Site Collections

Scheduled Approval

Scheduled Unpublish

Search and Process

Search Engine Sitemap job

Site Master Invalidation

Site Policy and Exchange Site Mailbox Policy Update

Solution Daily Resource Usage Update

Solution Resource Usage Log Processing

Solution Resource Usage Update

Storage Metrics Processing

Translation Export Job Definition

Translation Import Job Definition

Unified Policy Sync Status Update Job

UPA-ADImport – Per Database User Profile to SharePoint Full Synchronization

UPA-ADImport – Unified Group Processing High Performance Job

Upgrade site collections job

Upgrade Work Item Job

Variations Create Hierarchies Job Definition

Variations Propagate List Items Job Definition

Variations Propagate Page Job Definition

Variations Propagate Sites and Lists Timer Job

Video Query Rule Provisioner

Workflow Auto Cleanup

Workflow Failover

Add a Comment