title: start a service with Alarmmanager at specific date and time and Repeating
body: <p>I want to create reminder app</p>
  
  <p>I have searched a lot of places but couldnt find a clean sequential explanation of how to start a service (or if thats not possible then an activity) at a specific time daily using the AlarmManager?</p>
  
  <p>i want start service at specific date and time and for example Six months after that date start the service again And continue this cycle</p>
  
  <pre><code>Calendar cur_cal = new GregorianCalendar();
  cur_cal.setTimeInMillis(System.currentTimeMillis());//set the current time and date for this calendar
  
  Calendar cal = new GregorianCalendar();
  cal.add(Calendar.YEAR, 2018);
  cal.set(Calendar.MONTH, 2);
  cal.set(Calendar.DAY_OF_MONTH, 12);
  cal.set(Calendar.HOUR_OF_DAY, 9);
  cal.set(Calendar.MINUTE, 0);
  cal.set(Calendar.SECOND, 0);
  cal.set(Calendar.MILLISECOND, 0);
  
  Intent intent = new Intent(ProfileList.this, BroadcastedReceiver.class);
  PendingIntent pintent = PendingIntent.getService(ProfileList.this, 0, intent, 0);
  AlarmManager alarm = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
  alarm.setRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), 1000, pintent);
  </code></pre>
  
  <p>i tried this code to activate the alarm at 2018-02/12 9:00... this is Works on this date but i have problem to repeating after for example six month...How do I change the codes to be start service every six months?</p>
  
  <p>NOTE: Dates are stored in the database And they will be called from there</p>