SharePoint - 如何check當前server的Timer service instance的狀態?

對於企業在維護SharePoint farm server時候,會根據需要考慮是否在每個web frond end server上enable Timer service instance去執行timer job,還是disable。

那麼如何check當前的server上是否啓用了Timer service instance呢? 可以通過下面方法查看。

方法一:

1. 打開SharePoint Central Admin-> Monitoring-> Review Job Definitions;

2. 在顯示的Job definition右邊設置filter查看當前server是否有job;

3. 如果當前server沒有job definition,則timer service instance在此server是disable的。

方法二:

通過下面script執行查看。

Add-PSSnapin Microsoft.SharePoint.PowerShell

$farm = Get-SPFarm

$disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"}

if ($disabledTimers -ne $null)

{

    foreach ($timer in $disabledTimers)

    {

        Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status

        Write-Host "Attempting to set the status of the service instance to online"

        $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online

        $timer.Update()

    }

}

else

{

    Write-Host "All Timer Service Instances in the farm are online! No problems found"

}

 

如果當前server沒有開啓,會顯示下面信息。

 

感謝閱讀。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章