Car won't restart. Have to wait 30 minutes

Since it’s intermittent and unlikely to be tested while malfunctioning, I would guess ignition module or crank position sensor.