title: Run java program in every 15 minutes
body: <p>Following is a sample code from my program which queries the database and results are copied to different files in a directory. What I want to achieve is following code should run in 15 minutes interval so that Files are updated with the new data. </p>
  
  <pre><code>public class CountryLogtoCSV {
  
  static Connection con = null;
  static ResultSet rs = null;
  
  public static void main(String... argv)
  {
  FileWriter  filewriter=null;
  
  File countryHits=new File("countryhits.csv");
  filewriter=new FileWriter(countryHits);
  query = "SELECT countryID, count(*) as total FROM mobileCountryLog"
          + " WHERE aHitType='ALL' AND aDate&gt;'2012-11-06' GROUP BY countryID";
  
  rs = Database.getResult(connection,query)
  while (rs.next()) {
  
      //Writing result to File, FileWriter is used 
      filewriter.append(rs.getString("countryID"));
      filewriter.append(rs.getString("total"));
      filewriter.flush();
  }   
  
  File countryUnique=new File("countryunique.csv");
  filewriter=new FileWriter(countryUnique);
  query = "SELECT countryID, count(*) as total FROM mobileCountryLog"
          + " WHERE (aHitType='UNIQUE'AND aDate&gt;'2012-11-06' GROUP BY countryID;
  
  rs = Database.getResult(connection,query)
  while (rs.next()) {
  
      //Writing Result to File, FileWriter is used
      filewriter.append(rs.getString("countryID"));
      filewriter.append(rs.getString("total"));
      filewriter.flush();
  }   
  rs.close(); 
  
  }
  
  }
  </code></pre>
  
  <p>How to run this java class in every 15 minutes??</p>
  
  <p>Thanks,</p>