English 中文(简体)
Quartz.NET在某种代码采用某种方法时不会触发
原标题:Quartz.NET not triggering when certain code is in a method

我试图建立Quartz。 该网络在安排日常活动方面的作用。 在经过大量审判和错误之后,我发现,在目标方法<>内列入一条代码,使这一事件根本无法启动。

Quartz.NET()栏外,我有一门“IJob”类是压倒性的方法(附有一张一览表和插图;触发器)。

当犯罪线(混合)被拆除时,我可以打上追查点。 书面发言。 此时此刻,休息点永远不会被击中,产出在其他地方就没有出现。

守则:

public class MyUpdaterJob : IJob
{
    public MyUpdaterJob()
    {
    }

    public void Execute(JobExecutionContext context)
    {
        Trace.WriteLine("-- Yay - Job called");

        // Removing this line will result in the breakpoint above being able to be hit
        MyUpdateWorker updateWorker = new MyUpdateWorker();

        var logDate = context.FireTimeUtc.Value.AddHours(-1);

        // [...]
    }
}

我对它可能作出哪些评价,从而不会引发这一事件感到非常损失。 任何建议?

  • The MyUpdateWorker is in another library
  • This is currently running as an Azure Worker Role
最佳回答

Wow——这是一个奇迹。

由于该项目的有机增长,载有IJob执行内容的图书馆以前是一个专线器,我在几周前将产出转至级图书馆。

平台的目标(只有)是x86。 所有其他材料都是作为万国邮联汇编的,很可能是64倍。

我记得,我不得不人工编辑文件,以更新这一档案,但一旦把以前的项目——现在——现在——现在的图书馆交给任何CPU,它就会正确地触发!

问题回答

我认为,我检查了MyUpdateWorker(MyUpdateWorker)班的施工者,看看看是否所有工作ok,或许在诊断记录上都有一个记录,看看你是否能够在那里做会表明原因的事情。 通常,我看不到失踪图书馆的问题,或许缺乏依赖。

仅检查几件事(今天上午只有两张咖啡,这样一米仍然变暖)。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...