The Shulchan Aruch · Yoreh De'ah
יורה דעה שס״הYoreh De'ah 365
Siman 365 of 402 in Yoreh De'ah — 2 se'ifim
הלכות אבילותMourning· siman 365
Se’if 1א׳
הַחוֹפֵר כּוּךְ לַמֵּת, פָּטוּר מִקְּרִיאַת שְׁמַע וּמִן הַתְּפִלָּה וּמִן הַתְּפִלִּין וּמִכָּל מִצְוֹת הָאֲמוּרוֹת בַּתּוֹרָה. וְאִם הֵם שְׁנַיִם, וְהִגִּיעַ זְמַן קְרִיאַת שְׁמַע, אֶחָד עוֹלֶה וְקוֹרֵא קְרִיאַת שְׁמַע וּמִתְפַּלֵּל, וְחוֹזֵר זֶה וְחוֹפֵר, וְעוֹלֶה חֲבֵרוֹ וְקוֹרֵא קְרִיאַת שְׁמַע וּמִתְפַּלֵּל. וְדַוְקָא כּוּךְ, דְּלֹא חָפִיר לֵיהּ אֶלָּא חַד, אֲבָל אִם הָיָה מָקוֹם שֶׁשְּׁנַיִם יְכוֹלִים לְהִתְעַסֵק בּוֹ כְּאֶחָד, פְּטוּרִים.
One who digs a sepulchral chamber for a corpse is exempt1Ber. 14b on the principle that ‘one who is engaged in a religious act is exempt from other religious duties’ (Suk. 25a). This applies even if the grave-digger is not related to the corpse — A.H. from reading the Shema, from [reciting] the Tefillah2 supra § 341, 2. and from [wearing] phylacteries and from all religious duties enjoined in the Torah. If they were two [grave-diggers] and the time for reading the Shema arrived, one comes up3Tur adds: ‘and washes his hands.’ and reads the Shema and recites the Tefillah and [then] he returns and digs and his companion comes up and reads the Shema and recites the Tefillah. [And this applies] only to a sepulchral chamber which only one person [usually] digs, but if it was a place where two people may attend to it together, they are [both] exempt.4N in T.H. Cf. infra § 403, 9.
Se’if 2ב׳
מַרְחִיקִין הַקְּבָרוֹת מֵהָעִיר חֲמִשִּׁים אַמָּה.
Graves must be kept removed from a town [a distance of] fifty cubits.5Mishna B.B. 25a. On account of the bad odour. Cf. Ḥ.M. § 155, 23.
Shulchan Aruch, Yoreh De'ah — Torat Emet 357 edition, via Sefaria — public domain
English: Code of Hebrew Law, tr. Chaim N. Denburg, Montreal 1955 — CC BY