title: Start scheduled jobs in play
body: <p>I have a class like this:</p>
  
  <pre><code>package jobs;
  
  import play.jobs.Every;
  import play.jobs.Job;
  
  @Every("5s")
  public class ScheduledJobs extends Job{
  
      @Override
      public void doJob(){
          System.out.println("Job's done");
      }
  
  }
  </code></pre>
  
  <p>And the config file contains the following:</p>
  
  <pre><code>#Jobs executor
  # ~~~~~~
  # Size of the Jobs pool
  play.jobs.pool=10
  
  # Execution pool
  # ~~~~~
  # Default to 1 thread in DEV mode or (nb processors + 1) threads in PROD mode.
  # Try to keep a low as possible. 1 thread will serialize all requests (very useful for  debugging purpose)
  # play.pool=3
  </code></pre>
  
  <p>My question is how can I get play to start running this job every 5 second? If I create a ScheduledJobs instance and I call doJob it runs once only. Thank you for your help.</p>
  
  <p>EDIT:</p>
  
  <p>The ScheduledJobs is placed in a jobs package in my app directory.</p>
  
  <p>I tried everything however the job does not execute (even if I try <code>@OnApplicationStar</code> or any other annotation. The job is just not starting. if I call new <code>ScheduledJobs().now()</code> I get a null pointer exception at play.jobs.Job.java line 64. (Play 1.2.3).
  I need to solve this issue very soon. Please help me.</p>