An electric oven that turns off when the door is opened should have an added heating element that stays lit even when the door is opened. As the Rema wrote, the heat from the previous heating is enough, so a non-Jew may close the door, and a clock set by a Jew is considered lighting by a Jew.