In this paper we propose an exact algorithm for the general single-machine scheduling problem where machine idle time is permitted. The algorithm is an extension of the authorspsila previous algorithm for the problem without machine idle time, which is based on the SSDP (successive sublimation dynamic programming) method. In this algorithm a lower bound is computed by applying dynamic programming to a Lagrangian relaxation of the original problem and then it is successively improved by imposing additional constraints on the relaxation until the gap between lower and upper bounds diminishes. Unnecessary dynamic programming states are eliminated in the course of the algorithm to reduce both computational efforts and memory usage. Experimental results show that the proposed algorithm can solve 200 jobs instances of the single-machine total weighted earliness-tardiness problem.