The latest SharePoint version introduces a new setting that can be applied to each of the timer server instances: AllowServiceJobs
When this attribute is set to false, basically this server will not be able to execute timer jobs with SPJobLockType: Job ("Service Jobs").
This type of lock is needed to ensure that this timer job is executed only on one of servers, basically to prevent multiple executions of the same logic.
Several of our products are affected by this setting: Import, Actions, Alerts. These Products will not be able to function properly in regards of their background / timed functionality. Another impact may be on the installation process, in terms of failure in deploying required recourse files.
Mind that this behavior can be caused only on SharePoint 2016 / 2019 farms, as previous versions did not allow this setting to be controlled.
A common reason for this behavior might be the lack of an Application server in a multi-server farm, according to farm topology definitions a multi-server farm must have at least one Application server.
On a single server farm, there must be a server with this exact role: “Single-Server farm”.
You can use the following PowerShell script to determine the value of this property in your farm:
$farm = Get-SPFarm $FarmTimers = $farm.TimerService.Instances foreach ($ft in $FarmTimers) { write-host “Server: ” $ft.Server.Name.ToString(); write-host “Status: ” $ft.status; write-host “Allow Service Jobs: ” $ft.AllowServiceJobs; } |
And the following script to enable it:
$farm = Get-SPFarm $FarmTimers = $farm.TimerService.Instances foreach ($ft in $FarmTimers) { if ($ft.AllowServiceJobs -eq $false) { write-host “Service jobs are NOT enabled on ” $ft.Server.Name.ToString(); write-host “Enabling service jobs”; $ft.AllowServiceJobs = $true; $ft.Update(); } else { write-host “Service jobs are enabled on ” $ft.Server.Name.ToString() } } |
source: SharePoint 2016 / 2019 – Timer jobs with Job lock type do not run