views:

173

answers:

1

When you have multiple servers all running the same web application, how would you make sure multiple jobs don't get fired off (the same job)?

Would you have to use the database to monitor if the job was already run?

+3  A: 

I've solved this by only letting one of the servers run the scheduled jobs. If that job server goes down I reconfigure another server to start running jobs in its place. In my case the jobs are not all that critical so I can afford this type of "cold standby" solution.

There are however alternatives, Quartz can run with clustered schedulers and job stores. Read more here.

Martin