This paper introduces a new scheduling approach that optimizes truck appointments, truck service order, and container relocations at the yard through a bi-objective IP model with a lexicographical objective function. The proposed approach serves as a proactive decision support system that coordinates truck appointments with container handling operations to avoid excessive delays caused by container relocations. The performance of the approach is compared to existing practices of the online container relocation using a case study involving an operational Japanese container terminal. A rule-based heuristic for the online container relocation problem is formulated and compared to our proposed optimization approach. Taking into account a number of essential practical aspects, including trucking company preferences, container delivery schedules, yard capacity, and appointment levels, our proposed optimization approach has the potential to significantly reduce the number of relocations in the yard while making minimal shifts in the preferred container pickup times.