MB3 12a: Getting on a Boat Before Shabbos That Will Travel on Shabbos (248:1)

Leaving on a caravan on a weekday that will continue travelling on Shabbos. Doing so for the purpose of a mitzvah vs. for a dvar reshut. Putting yourself into a situation that may cause you to have to violate shabbos.