Predicting unexpected incidents and energy consumption decline is one of the current problems in the industry. The extant study addressed parallel machine scheduling by consideration of failures and energy consumption decline. Moreover, the present paper aimed at minimizing early and late delivery penalties, and enhancing tasks. This research designed a mathematical model for this problem that considered processing times, delivery time, rotation speed and torque, failure time, and machine availability after repair and maintenance. Failure times have been predicated on using machine learning algorithms. The results indicated that the proposed model can be suitably solved for the size of 10 jobs or tasks and five machines. This research addresses the problem in two parts: the first part predicts failures, and the second part includes the sequence of parallel machine scheduling operations. After the previous data were received in the first step, machine failure was predicted by using machine learning algorithms, and a set of rules were obtained to correct the process. The obtained rules were used in the model to improve the machining process. In the second step, scheduling mode was used to determine operations sequence by consideration of these failures and machinery unavailability to achieve the optimal sequence. Moreover, it is supposed to reduce energy consumption and failures. This study used the Light GBM algorithm and achieved 85% precision in failure prediction. The rules obtained from this algorithm contributed to cost reduction.