ScheduledExecutorService not working

I have a service that runs the following code:

ScheduledExecutorService timer ;
timer = Executors.newScheduledThreadPool(1);
timer.schedule(new MyTimerTask(), 15*60, TimeUnit.SECONDS);
But from some reason it is not working.

      

Does anyone have any ideas? Thanks a lot, Keren

+3


source to share


1 answer


make sure you do not destroy the ScheduledExecutorService reference holder object until execution time



0


source







All Articles