Shabbos 23:3-4
Shabbos 23:3
A person may not hire workers on Shabbos, nor instruct another to do so for him. One may not wait by the Shabbos boundary for Shabbos to end so that he can hire workers or bring in produce but he may wait there in order to protect his produce and he may bring in the produce that he was watching. Abba Shaul stated a general principle: if someone is allowed to talk on Shabbos about doing something, he may wait at the Shabbos boundary for Shabbos to end to do that thing.
Shabbos 23:4
One may wait by the Shabbos boundary for Shabbos to end in order to handle affairs for a wedding or a funeral, such as to bring a coffin or shrouds. If a non-Jew brought flutes (to play dirges) on Shabbos, a Jew may not deliver a eulogy to them unless they came from close by (i.e., within the Shabbos boundary). If non-Jews made a coffin or dug a grave on Shabbos for a non-Jew, a Jew may be buried in it. If they did so for a particular Jew, that Jew may never be buried in it (but another Jew may after waiting enough time that these things could have been done after Shabbos).