Siman 365
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א הַחוֹפֵר כּוּךְ לַמֵּת, פָּטוּר מִקְּרִיאַת שְׁמַע וּמִן הַתְּפִלָּה וּמִן הַתְּפִלִּין וּמִכָּל מִצְוֹת הָאֲמוּרוֹת בַּתּוֹרָה. וְאִם הֵם שְׁנַיִם, וְהִגִּיעַ זְמַן קְרִיאַת שְׁמַע, אֶחָד עוֹלֶה וְקוֹרֵא קְרִיאַת שְׁמַע וּמִתְפַּלֵּל, וְחוֹזֵר זֶה וְחוֹפֵר, וְעוֹלֶה חֲבֵרוֹ וְקוֹרֵא קְרִיאַת שְׁמַע וּמִתְפַּלֵּל. וְדַוְקָא כּוּךְ, דְּלֹא חָפִיר לֵיהּ אֶלָּא חַד, אֲבָל אִם הָיָה מָקוֹם שֶׁשְּׁנַיִם יְכוֹלִים לְהִתְעַסֵק בּוֹ כְּאֶחָד, פְּטוּרִים.
1 One who digs a sepulchral chamber for a corpse is exempt from reading the Shema, from [reciting] the Tefillah 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 up 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.
ב מַרְחִיקִין הַקְּבָרוֹת מֵהָעִיר חֲמִשִּׁים אַמָּה.
2 Graves must be kept removed from a town [a distance of] fifty cubits.