We can make an oscillating relay producing a rectangular signal taking advantage of the inductance of its coil and capacitance between turns, as shown in the figure. By connecting a 100 nF capacitor to 100 uF in parallel with the coil, we can reduce the frequency of the generated signal.