A method of driving a relay (22a, 22b) having a relay contact, wherein the following steps are performed: - a switching as an opening operation or as a closing operation on the relay (22a, 22b) is detected in time with respect to accurate opening or closing of the relay contact compared to a switching voltage zero crossing of a switching voltage to be switched, - the duration between energizing the relay (22a, 22b) with a switching trigger signal and an actual opening or closing of the relay contact with stop or start of a switching current flow is detected as a switching delay (SV on, SV off), - the switching voltage to be switched by the relay (22a, 22b) is monitored, - after release of a command for switching, the relay (22a, 22b) is triggered for switching with a switching release signal after being shifted forward in time by the switching delay (SV on, SV off) before a subsequent switching voltage zero crossing, - the actual switching time is detected in addition to the switching voltage zero crossing, - it is checked whether the actual switching time was too late or too early by a switching difference relative to the switching voltage zero crossing, the switching delay (SV on, SV off) being corrected with the switching difference for a subsequent similar switching: - by adding the switching difference to the switching delay (SV on, SV off) if the actual switching time was too late by the switching difference relative to the switching voltage zero crossing, or - by subtracting the switching difference from the switching delay (SV on, SV off) if the actual switching time was too early by the switching difference relative to the switching voltage zero crossing, - wherein a microcontroller is used for detecting the switching or opening and closing operation and the switching voltage zero crossing, characterized in that: an opening operation and a closing operation are performed alternately at the end of a positive half-wave and at the end of a negative half-wave of the switching voltage, respectively. - a switching as an opening operation or as a closing operation on the relay (22a, 22b) is detected in time with respect to accurate opening or closing of the relay contact compared to a switching voltage zero crossing of a switching voltage to be switched, - the duration between energizing the relay (22a, 22b) with a switching trigger signal and an actual opening or closing of the relay contact with stop or start of a switching current flow is detected as a switching delay (SV on, SV off), - the switching voltage to be switched by the relay (22a, 22b) is monitored, - after release of a command for switching, the relay (22a, 22b) is triggered for switching with a switching release signal after being shifted forward in time by the switching delay (SV on, SV off) before a subsequent switching voltage zero crossing, - the actual switching time is detected in addition to the switching voltage zero crossing, - it is checked whether the actual switching time was too late or too early by a switching difference relative to the switching voltage zero crossing, the switching delay (SV on, SV off) being corrected with the switching difference for a subsequent similar switching: - by adding the switching difference to the switching delay (SV on, SV off) if the actual switching time was too late by the switching difference relative to the switching voltage zero crossing, or - by subtracting the switching difference from the switching delay (SV on, SV off) if the actual switching time was too early by the switching difference relative to the switching voltage zero crossing, - by adding the switching difference to the switching delay (SV on, SV off) if the actual switching time was too late by the switching difference relative to the switching voltage zero crossing, or - by subtracting the switching difference from the switching delay (SV on, SV off) if the actual switching time was too early by the switching difference relative to the switching voltage zero crossing, - wherein a microcontroller is used for detecting the switching or opening and closing operation and the switching voltage zero crossing,