This paper studies single-machine scheduling problems with a due-window assignment under a deteriorating maintenance and time-and-resource-dependent processing times. Jobs completed within the due-window incur no penalties, other jobs incur either earliness or tardiness penalties. The maintenance activity can be scheduled immediately after any of the completed jobs. We assume that once the maintenance activity has been completed, the machine efficiency will be improved and the machine maintenance duration depends on its starting time. The objective is to find the maintenance position, the size and location of the due-window, and the sequence of jobs and resource allocation scheme to minimize a cost function based on the window size and location and the earliness and tardiness of jobs and resource. We propose an algorithm to solve the problem.