title: Best way to schedule tasks from database using Java (Spring)
body: <p>I'm looking for frameworks to schedule a set of tasks populated in the Database</p>
  
  <p>JPA entities look like this</p>
  
  <pre><code>@Entity
  class Task extends Model {
      @NotNull
      @Min(1L)
      @Column(name = "interval_ms", nullable = false)
      Integer interval
  
      @NotNull
      String payload  
  
      @NotNull
      Boolean enabled
  }
  
  @Entity
  class TaskResult extends Model {
      @ManyToOne(optional = false)
      Task task
  
      @Column(nullable = false)
      Boolean result
  
      @Column(nullable = false)
      String message
  }
  </code></pre>
  
  <p>tasks should be executed every interval defined in the "interval" field,
  result should be written into TaskResult table</p>
  
  <p>The purpose of task is to make a GET or POST request, so requests have to be pooled to avoid the situation when a lot of tasks start to execute in parallel.</p>
  
  <p>I'm using spring boot.</p>
  
  <p>what are best practices here?</p>