2

I know the Sharepoint timer job (OWSTIMER) has the workflow execution queued - I just want to see this queue! I want to see which workflow is next in this ominous queue.

Any way to check the workflow queue out via PowerShell / Console Application / Central Administration?

Dennis G
  • 21,405
  • 19
  • 96
  • 133

1 Answers1

2

The SPTimerJobAdmin project http://sptimerjobadmin.codeplex.com/ looks to provide what you are asking for, though it appears to be specifically for the 2007 product, so I can't say what it might do under 2010, but perhaps it can point you in the right direction and updating for 2010 shouldn't be too hard, it is a fairly small project.

As far using C# or PowerShell to query the timer jobs, you can probably find what you need in the SPFarm class (you will need to add a reference to the Microsoft.SharePoint.Administration namespace or fully qualify the class name). You can iterate over the jobs pretty easily:

var farm = Microsoft.SharePoint.Administration.SPFarm.Local;
foreach (var job in farm.TimerService.JobDefinitions)
{
  // check what you want from each job
  // Typical Properties: Schedule, Title, LastRunTime, TypeName, Status
}

It would be similar in PowerShell:

# Load the SharePoint assembly if necessary
PS C:\> [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
PS C:\> $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
PS C:\> $farm.TimerService.JobDefinitions | select Title,LastRunTime,Status
Goyuix
  • 23,614
  • 14
  • 84
  • 128
  • SPTimerJobAdmin seems like the only way I can look at the timer jobs, I still cannot see the particular workflows running **WITHIN** the job. – Dennis G Apr 06 '11 at 14:01