“由于负载过重,最新的工作流操作已排队” -->如何查看队列?

发布于 2024-10-19 22:27:03 字数 152 浏览 4 评论 0原文

我知道 Sharepoint 计时器作业 (OWSTIMER) 已将工作流程执行排队 - 我只想查看此队列!我想看看这个不祥队列中的下一个工作流程是哪个。

有什么方法可以通过 PowerShell/控制台应用程序/管理中心检查工作流队列吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暮光沉寂 2024-10-26 22:27:03

SPTimerJobAdmin 项目 http://sptimerjobadmin.codeplex.com/ 看起来可以提供您所要求的内容,尽管它似乎是专门针对 2007 年的产品,所以我不能说它在 2010 年下可能会做什么,但也许它可以为您指明正确的方向,并且 2010 年的更新应该不会太难,这是一个相当小的项目。

至于使用 C# 或 PowerShell 查询计时器作业,您可能可以在 SPFarm 类(您需要添加对 Microsoft.SharePoint.Administration 命名空间的引用或完全限定类名)。您可以非常轻松地迭代作业:

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
}

这在 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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文