Yep, there are whole departments of people who work hard to make the scheduling on railways work as well as possible. People always like to complain, but they always ignore the fact that the timetable has to try and satisfy a huge number of people with often very different needs, on networks with some very fixed constraints that are expensive and difficult to change.