If you want to use the same 10 threads, make the ExecutorService with the 10 threads in a scope outside the runnable method of the task being run, then access the Service from inside the scheduled task to schedule the new task.
If you want to make sure the 10 threads in the ExecutorService get shutdown then call service.shutdown() after the 10 tasks are finished being scheduled.
It's just a flesh wound! Or a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database