tags:

views:

71

answers:

1

I just started with Quartz.net and I have it running as a service. I created a Job and moved the resulting .dll to the Quartz folder and added a new entry to the jobs.xml file to kick it off every 3 seconds.

I updated the job .dll but it is in use by Quartz (or is locked).

Is it possible to update the .dll without restarting the Quartz service? If not what would happen to a long running job if I did stop/start the Quartz service?

+1  A: 

You cannot update the job dll without restarting the service. Once the server has started it loads the the job dll and the loaded types stay in memory. This is how .NET runtime works. To achieve something like dynamic reloading you would need to use programmatically created app domains etc.

If you stop the scheduler you can pass a bool parameter whether to wait for jobs to complete first. Then you would be safe with jobs completing and no new ones would spawn meanwhile the scheduler is shutting down.

Marko Lahma
could you tell me what the parameter is or a link to document this with hopefully an example?
Brian Boatright
It's the Shutdown method in IScheduler: http://quartznet.sourceforge.net/apidoc/topic93.html . It will block until jobs finish and you are safe to terminate process. Especially if you are using database persistence to handle misfires.
Marko Lahma