839. Punishments on Shabbos
Shabbos 24:7
Courts may not administer punishment on Shabbos even though doing so is a positive mitzvah (a “thou shalt”) because fulfilling a positive mitzvah does not override Shabbos. Therefore, if a person was sentenced to lashes or to execution, he is not punished on Shabbos. Exodus 35:3 says, “Do not light a fire in all of your dwellings on Shabbos.” This is a warning to the court not to execute by burning on Shabbos. The same therefore applies to all other court punishments.
Shabbos 24:8
One is permitted to guard his produce on Shabbos whether or not it is already detached from the ground. If a person or an animal tries to take it, he may yell at them and beat them in order to drive them away. This is permitted even though it involves tending to one’s own affairs because one is only restricted when it comes to acquiring new property, earning wages, making profits or other forms of new benefits. One is permitted to protect his existing interests. This is conceptually similar to locking one’s house as protection against thieves.