The Gemara permits setting traps before Shabbat that catch animals on Shabbat itself, and discusses how a Jew may set a process in motion before Shabbat that produces melacha automatically, establishing the paradigm for pre-Shabbat activation of ongoing processes.
תָּנוּ רַבָּנַן: פּוֹתְקִין מַיִם לַגִּינָּה עֶרֶב שַׁבָּת עִם חֲשֵׁיכָה וּמִתְמַלֵּאת וְהוֹלֶכֶת כׇּל הַיּוֹם כּוּלּוֹ, וּמַנִּיחִין מוּגְמָר תַּחַת הַכֵּלִים עֶרֶב שַׁבָּת וּמִתְגַּמְּרִין וְהוֹלְכִין כׇּל הַיּוֹם כּוּלּוֹ, וּמַנִּיחִין גׇּפְרִית תַּחַת הַכֵּלִים עֶרֶב שַׁבָּת עִם חֲשֵׁיכָה וּמִתְגַּפְּרִין וְהוֹלְכִין כׇּל הַשַּׁבָּת כּוּלָּהּ, וּמַנִּיחִין קִילוֹר עַל גַּבֵּי הָעַיִן וְאִיסְפְּלָנִית עַל גַּבֵּי מַכָּה עֶרֶב שַׁבָּת עִם חֲשֵׁיכָה וּמִתְרַפֵּאת וְהוֹלֶכֶת כׇּל הַיּוֹם כּוּלּוֹ. אֲבָל אֵין נוֹתְנִין חִטִּין לְתוֹךְ הָרֵיחַיִם שֶׁל מַיִם אֶלָּא בִּכְדֵי שֶׁיִּטָּחֲנוּ מִבְּעוֹד יוֹם. מַאי טַעְמָא? אָמַר רַבָּה: מִפְּנֵי שֶׁמַּשְׁמַעַת קוֹל. אָמַר לֵיהּ רַב יוֹסֵף: וְלֵימָא מָר מִשּׁוּם שְׁבִיתַת כֵּלִים! דְּתַנְיָא: ״וּבְכֹל אֲשֶׁר אָמַרְתִּי אֲלֵיכֶם תִּשָּׁמֵרוּ״ — לְרַבּוֹת שְׁבִיתַת כֵּלִים. אֶלָּא אָמַר רַב יוֹסֵף: מִשּׁוּם שְׁבִיתַת כֵּלִים. וְהַשְׁתָּא דְּאָמְרַתְּ לְבֵית הִלֵּל אִית לְהוּ שְׁבִיתַת כֵּלִים דְּאוֹרָיְיתָא, גׇּפְרִית וּמוּגְמָר מַאי טַעְמָא שָׁרוּ? מִשּׁוּם דְּלָא קָעָבֵיד מַעֲשֶׂה. אוּנִּין שֶׁל פִּשְׁתָּן מַאי טַעְמָא שָׁרוּ — מִשּׁוּם דְּלָא עָבֵיד מַעֲשֶׂה, וּמֵינָח נַיְיחָא. מְצוּדַת חַיָּה וְעוֹף וְדָגִים דְּקָא עָבֵיד מַעֲשֶׂה, מַאי טַעְמָא שָׁרוּ? הָתָם נָמֵי בְּלֶחִי וְקוּקְרֵי דְּלָא קָעָבֵיד מַעֲשֶׂה.
The Sages taught in a Tosefta: One may open a canal that passes adjacent to a garden on Shabbat eve at nightfall, so that water will flow into a garden and the garden continuously fills with water all day long on Shabbat. Similarly, one may place incense, perfumed herbs placed on coals to produce a fragrance, on coals beneath the clothes on Shabbat eve and the clothes may be continuously perfumed all day long. And, similarly, one may place sulfur beneath the silver vessels on Shabbat eve at nightfall for the purpose of coloring the vessels, and they may be continuously exposed to sulfur all day long. And one may place an eye salve [kilor] on the eye and a bandage [ispelanit] smeared with cream on a wound on Shabbat eve at nightfall, and the wound may continuously heal all day long on Shabbat. However, one may not place wheat kernels into the water mill unless he does so in a way so that they will be ground while it is still day on Friday and not on Shabbat. The Gemara asks: What is the reason that the baraita prohibited a mill and permitted other prohibited labor? Rabba said: Because it makes noise and the public will hear the mill grinding on Shabbat. Although no prohibited labor is being performed, doing so displays contempt for Shabbat. Therefore, the Sages prohibited it. Rav Yosef said to Rabba: And let the Master say a better reason, due to the obligation to ensure the resting of utensils. Even the utensils of a Jewish person may not be used for prohibited labor on Shabbat. As it was taught in halakhic midrash, the Mekhilta: That which is stated: “And in all that I said to you, take heed” (Exodus 23:13), is an allusion to matters mentioned in the Oral Torah. It comes to include the resting of utensils on Shabbat. Rather, Rav Yosef said: The reason for the prohibition of the mill on Shabbat is due to the resting of utensils. Since the obligation of resting utensils on Shabbat was mentioned, the Gemara says: Now that you said that Beit Hillel also hold that resting utensils on Shabbat is required by Torah law, with regard to sulfur and incense on coals that are placed under silver vessels and clothes, respectively, what is the reason that the Sages permitted this on Shabbat? Isn’t that performed on Shabbat in utensils? The Gemara answers: Because the utensil itself does not perform an action when the incense or sulfur is burning. With regard to the bundles of flax, what is the reason that they permitted placing them in the oven on Shabbat eve at nightfall to dry, even though the oven is performing a prohibited labor on Shabbat? Because it does not perform an action; rather, on the contrary, it sits idle in its place and the prohibited labor occurs on its own. However, with regard to traps of an animal, and a bird, and a fish, which perform a bona fide action of trapping, what is the reason that they permitted spreading them on Shabbat eve at nightfall? The Gemara explains: There too, it is referring to a fish hook and nets [kokrei], which perform no action. They stand in place, and the fish comes to them and is trapped. Indeed, a trap that performs an action is prohibited.