How to make a command block work every 30 seconds? [duplicate]

So im trying to make a command block which activates every 30 seconds. The command in the command block is /kill @e[type=minecraft:arrow] so it kills all arrows on the ground every 30 seconds. How can I do that?


Solution 1:

You can use a so-called hopper clock to give out a redstone signal every so or so ticks. If you put exactly 38 items in the Ethonian hopper clock, you will get a redstone signal every 304 ticks which is very close to 30 seconds (30.25 seconds).

Diagram: Ethionian Hopper Clock