2

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>

1 Answer 1

3

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

1
  • Thanks Krishna, that was helpful. So from here, i understand that i can find the assembly name of my job by looking at the dll which contains my job. Am i right? Feb 7, 2013 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.