A predictive maintenance policy for a system subject to degradation is considered. Over time, the system is subject to degradation. The degradation level is observed only at successive inspection times. The system has a nominal life Y, and it fails once the degradation exceeds the nominal life. Failure is detected only by inspection, and is then maintained (corrective maintenance). The system is also maintained when the degradation level exceeds a predetermine level M(preventive maintenance). Each preventive maintenance costs c(1), while the cost of a corrective maintenance is equal to c(1) + d, d greater than or equal to 0. At any inspection, before failure, the cost of inspection is state dependent: if the degradation level at inspection is x, then an inspection cost of c(x) occurs. We determine the optimal maintenance level M using the total discounted cost as well as the long-run average cost criteria. Our results extend those of Grall et al. [Grall, A., Dieulle, L., Berenguer, C., Roussignol, M. (2002). Continuous-time predictive-maintenance scheduling for a deteriorating system. IEEE Trans. Reliabilily 51:141-149].