Catch the 08:11 from Longniddry, arrives at 08:36. Catch the 08:48 which leaves on time and arrives only 2 minutes late.
On the way home things are a bit different. Catch the 17:11 from Edinburgh Park, which does not leave until 17:20, arrives in Edinburgh Waverley at 17:35 so if my next train for Longniddry, the 17:34, is on time – I’ve missed it. The 17:34 train for Longniddry is, of course, late. So for once the late running of a train is helpful.
It transpires however, the the previous train for Longniddry, the 17:09 was cancelled so we now have a train that is standing room only, leaves at 17:40 and we have to stand all the way home.