Ali Doruk Baykal
Ali Doruk Baykal

Reputation: 93

What is the second value of quartz.net configuration job-type parameter?

I'm trying to use Quartz.net in my web project. I configured my application like this:

<job>

  <name>CRMMoreThanOneJob</name>
  <group>jobGroup1</group>
  <job-type>ReportingPortalBLL.Jobs.CRMCalledMoreThanOneJob, ReportingPortalBLL.Jobs</job-type>

  <durable>true</durable>
  <recover>false</recover>
  <job-data-map>
    <entry>
      <key>MessageToLog</key>
      <value>Hello from MyJob</value>
    </entry>
  </job-data-map>
</job>

But it did not work because of the job-type statement. My Job class' is defined like below and its namespace is ReportingPortalBll.Jobs

namespace ReportingPortalBLL.Jobs
{
 public class CRMCalledMoreThanOneJob:IJob
 { .
   .
 }
}

After i changed it to ReportingPortalBLL.Jobs.CRMCalledMoreThanOneJob, ReportingPortalBLL (without .Job) it worked well.

I looked at the documentation but couldn't find what is represented at the second value of job-type parameter. What should i write on the second parameter? What is the second value on the below representation means? I will be using Quartz on my other projects so it would be nice to know how to configure it easily.

<job-type>Namespace.Job1, secondValue</job-type>

Upvotes: 2

Views: 1215

Answers (1)

Krishna
Krishna

Reputation: 134

The secondValue corresponds to assembly name.

If you go through the source code of quartz.net you can see that the job-type is being passed to Type.GetType as parameter and Type.GetType accepts a assembly qualified name. The assembly-qualified name of a type consists of the type name, including its namespace, followed by a comma, followed by the display name of the assembly.

refer to these links for more info http://msdn.microsoft.com/en-us/library/c5cf8k43.aspx http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname.aspx

Upvotes: 3

Related Questions