title: scheduled alarm to repeat every minute of the clock android
body: <p>I have an app which requires a code to be executed every minute. But the issue is that the code has to be executed at every minute change of the clock. Which means,</p>
  
  <p>If its 12:34 then the code will execute at 12:35 and goes on. But my current code works but it includes the seconds. Meaning,</p>
  
  <p>If its 12:34:30 and the alarm starts, the code is executed. But the code is then executed at 12:35:30.</p>
  
  <p>I want the code to be executed each minute according to the clock of the phone. Below is the current code.</p>
  
  <pre><code> Intent intent2 = new Intent(MainActivity.this, MyABService.class);
                  PendingIntent pintent = PendingIntent.getService(MainActivity.this, 0, intent2, 0);
                  AlarmManager alarm_manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
                  alarm_manager.setRepeating(AlarmManager.RTC, c.getTimeInMillis(), 1 * 1000, pintent);
  </code></pre>
  
  <p>Im making it execute every second so that the effect takes place at the exact time. Instead of having it every second i need it to repeat itself at every minute change of the clock (every minute)</p>
  
  <p>How do i go about this</p>