The failure times of n machines are i.i.d. exponential random variables with parameter λ. This paper extends Assaf and Shanthikumar’s repair and replacement model to the case where repair time is a nonnegative random variable. The behaviour of the optimal policy as a function of the cost parameters is investigated. The cost function is shown to be unimodal and an easily implemented algorithm for finding optimal policies is developed.