838. Permitted for the Sake of a Mitzvah
Shabbos 24:5
It is permitted to run on Shabbos for purposes of a mitzvah, such as to shul or to a beis medrash (study hall). We are permitted to calculate accounts for purposes a mitzvah and to make measurements for a mitzvah, such as to measure a mikvah to ensure that it is large enough or a cloth to see if it is susceptible to ritual impurity. We are permitted to pledge charity on Shabbos and to go to shuls, study halls, and even secular auditoriums in order to take care communal needs on Shabbos. One may speak about arranging marriages and arranging education, both in Torah study and preparation for a profession. We may visit the sick and comfort mourners on Shabbos, though those who visit the sick should say, “It is Shabbos when we are not permitted to plead but recovery will come soon.” One may wait by the Shabbos boundary (techum) for Shabbos to end in order to take care of the needs of a bride or of a deceased person, such as to bring a coffin or burial shrouds. One person may instruct another which locations to shop for these things and how much to offer initially but he may not specify the maximum amount that he is willing to pay. All of these things are permitted because they are being done for purposes of a mitzvah. Isaiah 58:13 only cautions us against pursuing our own interests; our interests are prohibited but God’s are permitted.
Shabbos 24:6
One may depart on a ship on the Mediterranean on Friday in order to fulfill a mitzvah. He must make an arrangement not to sail on Shabbos but the captain need not honor the arrangement. Vows may be annulled on Shabbos whether or not those vows affect Shabbos. One may ask a religious authority to absolve him of a vow on Shabbos if doing so is necessary for Shabbos; this is so even though the person could have done so before Shabbos. Again, these things are permitted because they are for the sake of a mitzvah.