The rolling stock maintenance scheduling problem addressed here involves scheduling a set of cyclical preventive maintenance activities while considering resource capacity and geographically dispersed depots. The objective is to minimize both corrective and preventive maintenance costs using reliability features. We propose to use rolling horizon to decompose the problem into several successive subproblems such that each one tackles the scheduling of only the next cycle of activities instead of all cycles. The scheduled dates to be fixed should be as close as possible to their respective deadlines. Each train can have three status (in service, in maintenance, out of service). The activities deadlines are determined depending on component failure rate which has to be respected otherwise the train becomes out of service. An integer linear programming (ILP) model is proposed to solve the subproblem using a time oriented modeling to get an accurate maintenance cost (preventive and corrective) and respect a minimum of available trains. The rolling horizon allows to build a feasible schedule within a predefined planning horizon for moderate size problems with an interesting trade-off between computation time and solution quality.