title: Cron job to invoke HTTP restful api
body: <p>I am using J2EE with Jboss server. I am trying to finding a way to invoke sendEmail api in my code every month. </p>
  
  <pre><code>@GET
  @Path("/sendEmail")
  @Transactional
  public String test(){
  </code></pre>
  
  <p>I want to invoke this test api which can be accessed using web-browser <a href="http://localhost:8181/api/calc/sendEmail" rel="nofollow noreferrer">http://localhost:8181/api/calc/sendEmail</a></p>
  
  <p>I found some ways to do this:
  <a href="https://cloud.google.com/appengine/docs/java/config/cron" rel="nofollow noreferrer">https://cloud.google.com/appengine/docs/java/config/cron</a>
  <a href="https://www.mkyong.com/java/how-to-run-a-task-periodically-in-java/" rel="nofollow noreferrer">https://www.mkyong.com/java/how-to-run-a-task-periodically-in-java/</a></p>
  
  <p>Using cron job looks intuitive way to do this but I find it difficult to search resources to find a way to schedule invoking of the APIs using it.</p>
  
  <p>Please point me to some resources where I can find a way to do so by just adding single dependency for this purpose in pom.xml</p>