The rapid global economic development of the world economy depends on the availability of substantial energy and resources, which is why in recent years a large share of non-renewable energy resources has attracted interest in energy control. In addition, inappropriate use of energy resources raises the serious problem of inadequate emissions of greenhouse effect gases, with major impact on the environment and climate. On the other hand, it is important to ensure efficient energy consumption in order to stimulate economic development and preserve the environment. As scheduling conflicts in the different workshops are closely associated with energy consumption. However, we find in the literature only a brief work strictly focused on two directions of research: the scheduling with PM and the scheduling with energy. Moreover, our objective is to combine both aspects and directions of in-depth research in a single machine. In this context, this article addresses the problem of integrated scheduling of production, preventive maintenance (PM) and corrective maintenance (CM) jobs in a single machine. The objective of this article is to minimize total energy consumption under the constraints of system robustness and stability. A common model for the integration of preventive maintenance (PM) in production scheduling is proposed, where the sequence of production tasks, as well as the preventive maintenance (PM) periods and the expected times for completion of the tasks are established simultaneously; this makes the theory put into practice more efficient. On the basis of the exact Branch and Bound method integrated on the CPLEX solver and the genetic algorithm (GA) solved in the Python software, the performance of the proposed integer binary mixed programming model is tested and evaluated. Indeed, after numerically experimenting with various parameters of the problem, the B&B algorithm works relatively satisfactorily and provides accurate results compared to the GA algorithm. A comparative study of the results proved that the model developed was sufficiently efficient.