Condition-based monitoring is used as part of predictive maintenance to collect real-time information on the healthy status of a vessel engine, which allows for a more accurate estimation of the remaining life of an engine or its parts, as well as providing a warning for a potential failure of an engine part. An engine failure results in delays and down-times in the voyage of a vessel, which translates into additional cost and penalties. This paper studies a spare part management problem for maintenance scheduling of a vessel operating on a given route that is defined by a sequence of port visits. When a warning on part failure is received, the problem decides when and to which port each part should be ordered, where the latter is also the location at which the maintenance operation would be performed. The paper describes a mathematical programming model of the problem, as well as a shortest path dynamic programming formulation for a single part which solves the problem in polynomial time complexity. Simulation results are presented in which the models are tested under different scenarios.