Shabbat prohibitions become forbidden at the onset of Shabbat, but before Shabbat begins, one may take actions whose effects will continue into Shabbat. A prominent example of this is using a timer (“Shabbos clock”). Such timers are connected to the power supply and to an appliance, and its settings control the flow of electricity, determining when the device will turn on and off. This is how, nowadays, we can set electric lights to go on and off over the course of Shabbat. One may leave on lights before Shabbat and set the timer to turn them off at bedtime, on again at lunch time, and off again for the afternoon before turning on again for se’uda shlishit. Similarly, one can use a timer to turn on an electric oven or fan, setting it so that the appliance will go on and off at the desired times.
If one sets a timer to turn off the lights at 11 PM, but then decides that he would like to study Torah until midnight, some say that he may not delay the time that the lights will be extinguished by adjusting the timer’s settings, as in their opinion, the timer is an integral part of the lighting system, and the Sages forbade taking any action that effects a change in the duration of the lights’ operation. This can be inferred from the talmudic case of attaching an oil-filled container to an oil lamp, which the Sages forbid out of concern that one might remove some of the oil on Shabbat (Shabbat 29b; Beitza 22:1).
Others, including R. Shlomo Zalman Auerbach, offer a different perspective. They maintain that delaying the time the lights will go out is comparable to the case of one who is sitting in a room with a lit oil lamp. If the wind starts to blow though his window, threatening to extinguish the light, everyone agrees that he may close the window, even though this allows the lamp to burn longer. Since he is not doing anything to the lamp itself, but merely preventing the wind from blowing it out, there is no prohibition. Similarly, one who extends the settings of a timer is not doing anything to the light itself or to the electrical appliance, but merely preventing the timer from turning them off. Assuming that this action is permitted, the switches on the timer are not muktzeh, and they may be adjusted.
Since the rationale of those who are lenient is compelling and also accords with the widespread practice, one may rely on their opinion even le-khatĥila. Therefore, one may take action to extend the current state of affairs. If the electricity is off, one may extend the time that it will remain off and have the lights go on later. If the electricity is on, he may lengthen the time that it will remain on, and have the lights go out later. Similarly, if the lights are off, one can move the light switch to the off position, so that when the timer eventually restores the power, those lights will not go back on (SSK 13:26-33).
However, one may not change the timer so that lights or appliances will go on or off earlier. For example, if the timer was set so that the lights would go off at midnight, but it turns out that people want to go to sleep earlier, one may not adjust the timer’s settings to make the lights go off earlier. Although he is not turning them off directly because his actions will not have any effect until later, nevertheless indirectly causing lights to go off is rabbinically forbidden. Similarly, if the timer was set to turn the lights on at 10 AM, it may not be adjusted to make the lights come on earlier, as indirectly causing lights to go on is rabbinically prohibited.
. Some maintain that making any change to the settings of an electric timer is prohibited by Torah law (Yaskil Avdi 7:23), while others maintain that only certain kinds of changes are prohibited by Torah law (Igrot Moshe, YD 3:47:4; Az Nidberu 3:25 and 8:32). If this opinion is correct, then the problem of muktzeh also comes into play. Nevertheless, the logic of those who are lenient is very compelling, as explained in Harĥavot. First, the stringent position is based on the opinion of Rosh and those who follow him, with which many disagree (above ch. 16 n. 1). Second, it would seem that even Rosh would permit in this case, as the action of adjusting the timer is not done directly to the lights. Indeed, R. Shlomo Zalman Auerbach writes thus in Minĥat Shlomo §13, as does R. Ovadia Yosef in Yabi’a Omer, OĤ 3:18.It should be added that when the lights are off, one may increase the time they will remain off, even if they will go on in the interim period. In other words, if the lights are off during the night, and are set to go back on at 10 AM and turn off again at noon, one may adjust the timer so that the lights will go off at 11 AM. The principle is that while the lights are off, one may cause them to be off for a longer period of time. This is true whether the current state is being extended, or whether the future state is being extended following a period when the lights will be on. Similarly, while the lights are on, one may cause them to be on for a longer period of time, even if in the interim they will turn off for a certain amount of time (SSK 13:30).
. This applies under normal circumstances. However, in cases of need, those who are lenient allow causing a timer to turn the lights on earlier. According to most poskim, using a timer is considered grama, which some permit even le-khatĥila (Taz), and most permit in times of need (as explained above 9:9). This is the position of R. Shlomo Zalman Auerbach as cited in SSK 13:29, and of R. Ovadia Yosef in Yabi’a Omer, OĤ 3:18. Therefore, when one is sick (even if he is not dangerously ill), if the lights are disturbing his sleep and the timer is set to turn off the lights in a couple of hours, the settings may be changed so that the lights will go out in half an hour instead. An additional reason to be lenient is that turning off lights is only a rabbinic prohibition (above, section 1). In a case of dire necessity, one may make the lights turn on earlier for the sake of a mitzva, such as if the lack of light would cause one to waste much time that would have been spent learning Torah. In deference to the stringent position, however, it is proper to use a shinui when making the adjustment.