Question: May one set a trap for animals when the trap continues to operate on Shabbat?
Answer: In the previous Halacha we have established that one of the thirty-nine works forbidden on Shabbat is trapping. This means that if one traps a living creature on Shabbat, one is liable for Shabbat desecration. Similarly, if one kills any living creature on Shabbat, one is likewise liable for the Torah prohibition of Shabbat desecration.
Setting a Trap on Shabbat
Clearly, if one sets a trap on Shabbat and immediately thereafter, an animal is trapped in it, one is certainly liable for the Torah prohibition of trapping on Shabbat, for there is no distinction if one traps an animal by hand or using a vessel or another utensil.
However, if one sets a trap on Shabbat and only at a later time is the animal trapped, one is not liable for the Torah prohibition of trapping on Shabbat since this does not entail a direct work which the Torah has forbidden; rather, this forbidden work is only resulting indirectly, for the trap only carries out its function at a later time, i.e. when the animal enters the trap.
Nevertheless, the Tosafot (Shabbat 17b) write that our Sages have enacted that one may not lay a trap for animals, birds, or fish on Shabbat out of concern that an animal might be caught in it immediately when one lays it, causing one to transgress a Torah prohibition. (There are other reasons to prohibit this as well.) Based on this, Maran Ha’Shulchan Aruch (Chapter 252, Section 1) forbids setting a trap for any kind of living creature on Shabbat.
It is therefore forbidden to trap wildlife on Shabbat using any kind of traps on Shabbat.
Setting a Trap on Erev Shabbat
Nonetheless, if one lays the trap before the onset of Shabbat, Maran Ha’Shulchan Aruch (ibid.) rules that this is indeed permissible, for our Sages permitted one to begin a forbidden work before the onset of Shabbat even if it will be completed on its own on Shabbat. It is therefore permissible to soak clothing in water on Erev Shabbat although the garment will continue to be laundered throughout Shabbat, in addition to several other examples.
Summary: One may set a trap before the onset of Shabbat even if animals will be trapped in it on Shabbat. It is nevertheless forbidden to do so on Shabbat. In the next Halacha, we shall, G-d-willing, discuss the law regarding mouse traps and traps for other harmful insects on Shabbat.