The capacitor improves the pulse generated in the transformer primary and reduces arcing across the relay contacts. You definitely want one.
If you only want to produce a brief pulse at regular intervals, a couple of hardware timers would be a far easier and cheaper way to do it. This is not a problem that calls for a microcontroller.