Introductory:

  1. Use Quartz.NET
  2. I have a job that needs to be done every minute. Those. the trigger will fire every minute, trigger the appropriate work and do something. There are cases when, in a given minute, the work does not have time to complete all its actions. In this case, two calls to a single trigger seem to overlap each other. In order to not work in parallel, the DisallowConcurrentExecution attribute is set on it (it prohibits parallel execution).

Behavior:

  1. At the beginning of the minute, the trigger wakes up and causes a specific job.
  2. In the work, preparatory actions are carried out and then we call an operation from it in the WCF service.
  3. This operation may take longer than a minute. Work all this time is waiting for the service to be executed.
  4. After the service is completed, the rest of the work continues.

Problem: Experimentally, we noticed that after the service call was made, an additional trigger was created immediately by the quartz itself, the TriggerKey of which begins with "MT_". What it is? Why is the new trigger itself created? When are MT_ triggers created? Why such triggers themselves are then deleted? I want to understand the nature of his appearance. Maybe we are doing something wrong at home.

  • Do you use only Quartz.NET or in conjunction with something like Topshelf ? - Anton Komyshan
  • Yes, of course with Topshelf. With it, quartz as a service is deployed. - Scandal
  • And in general, some kind of muddy topic with these "MT_" triggers. On the quartz office, they write that these are manual triggers (manual trigger = mt), but what is meant by this is not given. Moreover, such triggers are always SimpleTrigger. Where they come from is a big mystery. Neither our application, nor even the user, does not create a trigger by hand. - Scandal
  • Probably it is meant that the manual will be launched by the schedulers "manually" immediately after the end of the sending job. - Anton Komyshan

1 answer 1

I dealt with the problem myself. I leave the answer for those who may also face the problem described in the question.

Triggers TriggerName whose name is "MT_" are generated by the following Quartz method:

 void TriggerJob(JobKey jobKey); void TriggerJob(JobKey jobKey, JobDataMap data); 

These methods are designed to instantly start some work to be done, rather than at a certain time. But they start the work exclusively in the form of SimpleTrigger. Actually for SimpleTrigger and this method is intended. And for CronTriggers in Quartz there is no possibility of instant launch, because The minimum time you can specify a CRON expression is a minute.