I’m trying to create a remote job for scheduling in Quartz.net. When I have a copy of the assembly containing the job locally I can do something like this
JobDetail job = new JobDetail("remotelyAddedJob", "default", typeof(DummyJob.DummyJob));
This requires that I have a copy of the assembly containing the class DummyJob both on the server and on the computer I am creating the schedule from.
What I’d like to do is be able to create the schedule without a client-side copy of the assebmly, by sending the job-type information the way it is stored in the quartz_jobs.xml file
<job-type>Quartz.Job.NoOpJob, Quartz</job-type>
I have not been able to figure out how to send the class type information without having a local copy. Does anyone have a good solution to this?
This problem was really bugging me. I knew that I could generate classes on the fly, so I looked into how.
Step 1: Create this class
Step 2: Change from this
to this
Step 3: Run as before (but without a copy of your job assembly being referenced in the client)
— Edit —
While this did what I originally wanted it to, it doesn’t resolve all of the issues when using Quartz.Net from a client environment. Retrieving the job requires that the assembly be available.
My current approach is to create a web-service interface that will reside on the same server as the service and present a more disconnected interface.