1

I have an application that generates Reports. We have a webpage with two button "Generate Report" and "Cancel".

Now on click of "Generate Report" I trigger a cronjob, which generates the report. I have a load balanced environment L1 & l2 servers. Now once I click "Generate Report" the cronjob starts running on one of the servers, so if I click the "Cancel" button now, it sometimes throws an error because it tries to stop the cronjob on the server on which it is not running.

So the question is "How do I know on which server the cronjob was started and needs to be stopped" ?

AaShish Upadhyay
  • 243
  • 3
  • 12

0 Answers0