Hi everyone,
I'm trying to implement Quartz jobs in my web application, It's fine in development environment, because it's deployed only in one server, there are no load balancing, however the application, for production environment is deployed in 2 different servers, since my quartz jobs are meant to send e-mails every time they are executed, witout doing anything special, they would be sent twice, my first approach here is to add an special parameter to the servers, something like -DExecuteQuartz=Yes / No, being "Yes" for one server and "No" for the other one and, from my code, through the System.getProperty("ExecuteQuartz"), i would know whether this server will wxecute the quartz job or not, however, this would limit the quartz execution to just one server, what if this server is down by the time is scheduled to be executed, another approach would be the same, but scheduling the execution not once but at least twice a day, but then i would have to add an "Already Executed" status in the database or something...
Those are the only approaches i can think of, my question is, is there a better way to implement quartz jobs in multiple servers?
Thanks in advance for taking the time to answer this request...
Regards,
Julio Fernandez