title: multi threaded task scheduler in java
body: <p>I have some tasks which we need to execute again and again in a defined interval for each task, and each task has to execute in their own different different thread.<br/></p>
  
  <p>Example: let's say I have <em>task1,task2,task3,task4.....taskN</em> <br/></p>
  
  <p>I want to execute each task again and again in defined intervals<br/>
  e.g. </p>
  
  <ul>
  <li>task1 interval after each 1 sec</li>
  <li>task2,4 sec</li>
  <li>task3,2 sec</li>
  <li>....</li>
  <li>taskN in 10 sec</li>
  </ul>
  
  <p>and for each task different different thread should be created not in for loop kind of,</p>
  
  <p>Please suggest the approach and share the sample java code, or let say I has 10 database queries and all queries has to run in different threads and after defined interval again and again till infinite..</p>