In manufacturing systems, many maintenance tasks require equipment to be stopped in order to safely perform them. However, such stoppage cannot last for too long since it might directly result in short-term production losses. In this paper, we investigate how long we can strategically shut down equipment for maintenance during scheduled operations without affecting system throughput. Using the concept of maintenance opportunity windows (MOWs), we estimate such time intervals for various system configurations. Simulations are used to deal with uncertainties in production lines, such as random machine failures, starvations, blockages, etc. Moreover, the proposed MOW algorithms are demonstrated through simulations and real case studies in an automotive assembly plant