I\'m working on a Java project where I need to have multiple tasks running asynchronously. I\'m led to believe Executor is the best way for me to do this, so I\'m familiari
how about this
Runnable task = () -> { try{ // do the task steps here } catch (Exception e){ Thread.sleep (TIME_FOR_LONGER_BREAK); } }; ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); executor.scheduleAtFixedRate(task,0, 0,TimeUnit.SECONDS);