Timer to do certain function

Hi all. May i know whats the ways of doing a every 30mins timer to do a certain function without disrupting the programme flow? I'm using a DS32321 real time clock. Please help if you have any ideas to do that. Thank you

AdenOng:
without disrupting the programme flow?

Are you obeying the rules of cooperative multitasking? Please post your entire sketch, in code tags. The basic logic goes like:

time_type oldMinute
...
read thisMinute from RTC
if thisMinute != oldMinute
{
  oldMinute = thisMinute
  if thisMinute == 0 or thisMinute == 30
  {
     do your thing
  }
}

without disrupting the programme flow?

I am afraid that the program flow will be diverted, if not disrupted, when it is time to do the "certain function".

Is the program doing anything else besides waiting for the trigger time to occur and what does the "certain function" do ? Ideally neither should block the program, so no use of delay(), time consuming for loops or long while clauses are suitable.