title: Timer Schedule run method Every 15th Minute
body: <p>I would like to run method every 15 minutes for example 0:15,0:30,0:45,1:00,1:15,1:30 etc.</p>
  
  <p>Please let me know where I have
  made mistaken below code not working properly?</p>
  
  <pre><code>public class MainClass{
      //Set Calendar
      Calendar calendar =  Calendar.getInstance();
      calendar.set(Calendar.MINUTE , 15);
      private Timer timer;
      switch(flag) {  //here flag 1 ,2 etc
      case 1: //Initial Server 
      timer.schedule(new MyTask(),0);
      break;
      case:2
      timer.schedule(new MyTask(),calendar.getTime(),Long.valueOf(1)*1000*900);
      break;
      }  
      class MyTask extends TimerTask{
          public void run() {
          //Method Stuff here 
          }
      }
  }
  </code></pre>