It means to happen at the last possible moment, often to avoid missing something or prevent a problem.

točno na vrijeme, u pravi čas