Hello Everyone!
I have written a code for sending emails based on time. These emails will delivered 24 hrs and 2 hrs before the specified time. But the problem is when I am running the code code eclipse the emails are going properly but when I am exporting a WAR file and deployed it on
tomcat the email is going repeatedly for four times.
For this I have used
java Timer class which is keep running in background and if the time difference matched the email status will update in DB after emails sent once. I need your help guys. Please suggests some idea how to prevent email for sending repeatedly. Is this a code problem or Tomcat?
Here is my code snippets