title: Quartz.Net Load Balancing via Web Service
body: <p>I'm new to Quartz.NET, so please bear with me here.</p>
  
  <p>I'm using Quartz as part of a website that is running on a cluster of servers.  In order to facilitate load balancing of the jobs, they are making calls to a web service (running on the same website) via a load balancer to ensure that they are executed on the web server with the least load.  Some of these jobs may take several hours to complete.  The problem with this is that the Quartz job and the web service may be running on different machines.  If the machine running the Quartz job crashes while waiting for the web service to complete on another machine then Quartz will not know if the task completed without issue.  I could call the web service asynchronously, but then Quartz will simply think that the job completed successfully immediately regardless of what happens in the web service.  This won't allow me to make sure that the same job doesn't run concurrently since Quartz will think that it completed.  It also doesn't allow for retrying on failure or allow me to see which jobs are currently running.</p>
  
  <p>Is there a feature in Quartz that I'm overlooking?  Has anyone else had to handle a similar situation?  Is there a better way to load balance Quartz jobs?</p>
  
  <p>For now, I'm thinking that I'll need to modify the Quartz JobRunShell class to not set the complete status of the job and trigger (not sure if this is the right place?).  Then allow my web service to set the statuses when it has completed.  I'll also need to add code to handle cases where the web service crashes and the job is never completed.  To do this, I'm planning on my web service creating a thread to periodically tell Quartz that the job is still running (via a new timestamp field that I'll add to the database).  I'll have to periodically check the running jobs to see if they are still running (via the new field) and if they haven't been updated in a while (say 5 times the update period) then I'll assume that the job has failed and make the job as failed and retry (where applicable).</p>
  
  <p>Any help / comments would be appreciated.</p>
  
  <p>EDIT: I'm using Quartz.Net version 2.3</p>