SharePoint 计时器作业未被调用

发布于 2024-08-03 01:06:19 字数 821 浏览 12 评论 0原文

我有一个计时器作业,已部署到具有多个 Web 前端的服务器。

  • 该计时器作业从分层对象存储中读取其配置。
  • 该计时器作业计划每天在服务器上运行。

但问题是这个计时器作业并不是每天都会被调用。我已经在计时器作业的 Execute() 方法中实现了事件日志记录,但我没有看到生成任何日志。

  • 关于什么可能导致 SharePoint 定时服务无法选择计时器作业来执行,您有什么想法吗?我该如何解决这个问题?

  • 在多个前端的服务器中运行计时器作业是否存在任何“陷阱”?计时器作业会在所有 Web 前端执行,还是任意一个执行?如何知道哪台机器将拥有我的事件日志?

  • 这可能是一个愚蠢的问题,但是使用多个前端进行负载平衡是否会影响分层对象存储的行为方式?

编辑:

其中一位评论者 Sean McDounough(感谢 Sean!!)提出了一个非常好的观点:

“计时器作业是否在所有 WFE 上运行将取决于您在构造函数中指定的 SPJobLockType 枚举值意味着该作业将在所有 WFE 上运行。”

现在,我的计时器作业负责定期向用户列表发送邮件。目前它被标记为 SPJobLockType.Job"

  • 如果我将其更改为 SPJobLockType.None,这是否意味着我的计时器作业将在所有 WFE 中单独执行?(这是不希望的,它会向所有用户发送垃圾邮件)多封电子邮件)

  • 或者这是否意味着计时器作业将在任意一个 WFE 中执行?

I have a timer job which has been deployed to a server with multiple Web front ends.

  • This timer job reads it's configuration from a Hierarchical Object Store.
  • This timer job is scheduled to run daily on the server.

But the problem is that this timer job is not getting invoked daily. I have implemented event logging in the timer job's Execute() method, but I dont see any logs being generated.

  • Any ideas as to what could cause a timer job to be not picked up for execution by the SharePoint Timer Service? How can I troubleshoot this problem?

  • Are there any "gotcha"s for running timer jobs in servers from multiple front ends? Will the timer job get execute in all the web front ends, or any one of them arbitarily? How to know which machine will have my event logs?

  • This might be a stupid question, but does having multiple front ends for load balancing affect the way Hierarchical Object Stores behave?

EDIT:

One of the commenters, Sean McDounough, (Thanks Sean!! ) made a very good point that:

"whether or not the timer job runs on all WFEs will be a function of the SPJobLockType enum value you specified in the constructor. Using a value of "None" means that the job will run on all WFEs."

Now, my timer job is responsible for sending periodic mails to a list of users. Currently it is marked as SPJobLockType.Job"

  • If I change this to SPJobLockType.None, does this mean that my timer job will be executed in all the WFEs separately? (THis is not desired, it will spam all the users with multiple emails)

  • Or does it mean that the timer job will execute in any one of the WFEs, arbitarily?

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

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

发布评论

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

评论(2

尝试使用 NET STOP SPTIMERV3 和 NET START SPTIMERV3 从命令行重新启动 SharePoint 计时器服务。我的猜测是计时器服务正在使用旧版本的 .NET 程序集运行。当您升级 WSP 解决方案时,计时器服务不会自动重新加载程序集。

Try restarting the SharePoint timer service from the command-line using NET STOP SPTIMERV3 followed by a NET START SPTIMERV3. My guess is that the timer service is running with an older version of your .NET assembly. The timer service does not automatically reload assemblies when you upgrade the WSP solution.

风铃鹿 2024-08-10 01:06:19

为此,请按照下列步骤操作:

  • 停止计时器服务。
  • 单击“开始”,指向“管理工具”,然后单击“服务”。
  • 右键单击“Windows SharePoint Services 计时器”,然后单击“停止”或“重新启动服务”。

这个 URL 对我有帮助。

To do this, follow these steps:

  • Stop the Timer service.
  • Click Start, point to Administrative Tools, and then click Services.
  • Right-click Windows SharePoint Services Timer, and then click Stop, or Restart service.

This URL helped me.

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