I am trying to make a code run repeatedly every X seconds.

Let me paint a wrestling scenario.

I have already written a code line to give Tyson fury a 5Kg punch at 40 seconds into the fight and then stop.. but there's no way I'm going to win the match with just one 5kg punch at 40 seconds. I need to be able to keep punching every 40 seconds.

Please who knows how I can achieve this?