Issuue with Timer Job

sns 9,246 Reputation points
2023-02-05T16:22:28.9866667+00:00

I Would like to see status of all timer jobs? is there any PowerShell command for that?

and We are suspecting something wrong with one particular timer job, is there any way to know what is wrong with particular timer job?

Those suspecting Timer Jobs name are: Nintex workflow timer job, SharePoint timer jobs

I would like to see where is wrong with these 2 timer jobs, where exactly I need to check? Please suggest.

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2023-02-06T08:11:16.2233333+00:00

    1.You could use following PowerShell to get status of all timer jobs.

    Get-SPTimerJob -Identity <SPTimerJobPipeBind> | Format-Table DisplayName,Id,LastRunTime,Status
    

    Reference:

    https://learn.microsoft.com/en-us/sharepoint/administration/view-timer-job-status

    2.You could use following example PowerShell to get timer job history for a specific timer job.

    # Variables
    $StartTime = “02/06/2023 01:00:00 AM”  # mm/dd/yyyy hh:mm:ss
    $EndTime = “02/06/2023 01:30:00 AM”
    $TimerJobName = “Immediate Alerts”  # replace it with the timer job name you want
    
    #To Get Yesterday’s use:
    #$StartDateTime = (Get-Date).AddDays(-1).ToString(‘MM-dd-yyyy’) + ” 00:00:00″
    #$EndDateTime   = (Get-Date).AddDays(-1).ToString(‘MM-dd-yyyy’) + ” 23:59:59″
    
    #Get the specific Timer job
    $Timerjob = Get-SPTimerJob | where { $_.DisplayName -eq $TimerJobName }
    
    #Get all timer job history from the web application$Results = $Timerjob.HistoryEntries  |where { ($_.StartTime -ge  $StartTime) -and ($_.EndTime -le $EndTime) } |Select WebApplicationName,ServerName,Status,StartTime,EndTime
    
    #Send results to CSV$Results | export-csv -Path <Path of the file> -NoTypeInformation
    

    References:

    https://vschamarti.wordpress.com/2020/07/27/get-sharepoint-timer-job-history-using-powershell/

    https://www.sharepointdiary.com/2015/09/get-timer-job-history-using-powershell.html

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.