I have the following issue and I would like to know what exactly happens. I am using Java\'s ScheduledExecutorService to run a task every five minutes. It works very well. E
If you are using scheduleAtFixedRate()
or scheduleAtFixedDelay()
, and your task bails out with an exception, that task will not be rescheduled. However, other independent tasks should continue to execute as expected. (See API Docs). If you care that this has happened, you can grab ahold of the ScheduledFuture
that is returned and call the get()
method. If the underlying task tosses an exception, you'll get it thrown out of the get()
method, wrapped in an ExecutionException
.