How long does 1245 last? One minute? That if statements 'says' for one minute trigger this event.
Now let's say you created a bool alreadyplayed = false
if(localtimeinfo.tm_hour == 12 && localtimeinfo.tm_min == 45 && !alreadyplayed)
in the if statement turn already played to true
add an else statement to the if that turns already played back to false.