Knowing that you are not actually trying to start and stop an industrial boiler every 3 seconds, then the timing function you are describing is called Repeat Cycle Timing. You can buy relay-type timers that have the Repeat Cycle function.
If you are using Allen Bradley RSLogix, you can use two TON timers to program the Repeat Cycle function, like this: