when a boiler comes on and generates heat it will stay on until the boiler stat stops the gas, if your boiler is coming on going off, coming on going off, then it's possible that the boiler stat if defective, is thinking the boiler is hotter than it is or the PCB is not dealing with the information from the stat or the circulation is slow or blocked not allowing the heat to leave the boiler. It's normal for a boiler as it achieves it's maximum temp, that it will cycle on and off until the boiler shuts down for a few minutes, this is all different from a issue with over heating, as if the boiler over heats then you will have to reset the boiler each time.