未添加预定代理

Scheduled agents not being added

我正在开发一个 Sitecore 解决方案,我在其中实施了一个代理并将其注册到包含配置文件中:

<agent name="Start customer data import job"
       type="My.Namespace.MyJob" 
       method="DoSomething" interval="00:02:00" />

我可以在 hostname/sitecore/admin/showconfig.aspx 中看到正确应用了包含文件,并且该代理位于现有代理旁边。

目前,该作业仅记录 INFO(我提供了虚假的命名空间、class 和方法名称,但实际配置是正确的):

使用 Sitecore.Diagnostics;

namespace My.Namespace
{
    public class MyJob
    {
        public void DoSomething()
        {
            Log.Info("My custom job has started.", this);
        }
    }
}

不幸的是,我看到日志语句根本没有写。日志级别确实允许 INFO 被记录。环顾四周后,我发现调度程序从未记录它正在添加代理。根据我在 google 上找到的内容,日志应该包含 Adding agent: Sitecore.Tasks.DatabaseAgent 之类的语句,但它没有。

调度器好像不是运行ning,为什么呢?

我正在使用 Sitecore 8.1 更新 3(修订版 160519)。

编辑:作业正在我们的测试服务器上运行,所以我安装的 Sitecore 肯定有问题。

我在 Include 文件夹中有一个旧的配置文件,其中有以下补丁:

<configuration>
  <sitecore>
    <pipelines>
      <initialize>
        <processor type="Sitecore.Pipelines.Loader.InitializeScheduler, Sitecore.Kernel">
          <patch:delete />
        </processor>
      </initialize>
    </pipelines>
  </sitecore>
</configuration>

此补丁确保调度程序永远不会被初始化,代理也永远不会 运行。删除配置文件解决了问题。