I am using Timertask in my web application to launch a background thread once every 24 hrs every day at midnight. So I have a ServletContextListener and in contextInitialized, I create a Timertask object timertask(say) and a Timer object say t.
I call
t.schedule(timertask, firstTime.getTime(), rescheduleMiliSec);
where firstTime.getTime() = midnight and rescheduleMiliSec = 24 hr.
The thread launches fine and does what it is supposed to do in DIT.Every 24 hrs it launches the background task.
When it moves to PROD, the thread runs only once when context is initialised but not after that.
Is there any specific setting that might be the cause for this?