Get Running Timer Jobs by PowerShell

Dear All,

Kindly, do you know if it is possible to get the running timers jobs using PowerShell..

We can not write server side code in production as we can not have downtime.

... Is there API for it? Is there a limitation? Is there a workaround? 

We have tried to get latest and check date by greater than that should mean the running one.. but it did not work..

Regards,

March 18th, 2015 3:08am

Hi,

Can you please check below url.

http://sharepoint.stackexchange.com/questions/94699/how-to-identify-the-jobs-which-are-running

Don't forget to mark it as an Answer if it resolves your issue and Vote Me as helpful if it useful.

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 8:01am

Hi

Use below command if you want specific timer job.

 $JobName="mytimer"

$WebApp Get-SPWebApplication http://mywebappurl

$jobGet-SPTimerJob| ?{$_.Name -match$JobName} | ?{$_.Parent -eq$WebApp}

for all timer job related to webapplication

$job Get-SPTimerJob -Webapplication $WebApp

   

March 18th, 2015 8:47am

Hi,

The following PowerShell script for your reference:

# Get current date
$date = Get-Date

# Show current date
Write-Host "Looking for running jobs with a Last Run Time of greater than or equal to" $date

# Get all Timer jobs and iterate
Get-SPTimerJob | ForEach-Object {

  # Get last run time for job
  $lastRunTime = $_.LastRunTime

  # If run time is greater than/equal to write it out
  if ($lastRunTime -ge $date)
  {
     Write-Host $_.Name", last run at" $_.LastRunTime
  }
}

Reference this blog:

SharePoint 2010Using PowerShell to Display Currently Running Timer Jobs

http://iedaddy.com/2011/09/sharepoint-2010using-powershell-to-display-currently-running-timer-jobs/

It works in my test environment.

Best Regards,

Dennis Guo

Free Windows Admin Tool Kit Click here and download it now
March 18th, 2015 9:54pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics