The European manufactory sector has been greatly impacted in recent times by the COVID-19 pandemic and the Russo-Ukrainian conflict, which have made energy prices soar to all-time highs reducing European companies' competitiveness in the global market. To remain competitive in these crises, manufacturing companies need to start optimizing not only their energy costs but also maintenance-derived costs, by better planning maintenance activities, through joint production and maintenance scheduling, and by improving machine longevity by way of reducing overload in single machines. Accordingly, the premise of the present paper is to propose an intelligent joint production and maintenance scheduling system to minimize total costs, that is, energy and maintenance costs, as well as minimize single-machine overload by balancing tasks between machines, while also allowing for imposed constraints in the production schedule. This is achieved through a Genetic Algorithm to solve the scheduling problem in flexible job shop manufacturing layouts. To reduce total costs, retailer energy price volatility, generated renewable energy resources availability and surplus selling, and maintenance stipulated hours prices are considered and benefited from as much as possible. Overload in single machines is reduced by minimizing the machine occupation rate standard deviation in the production schedule. A baseline scenario with real-production data from a work in the literature is used to validate the proposed scheduling system. Obtained results show that the proposed system is able to reliably reduce energy costs by 11.3% up to 15.4%, and single machine overload by 32.3% up to 52.7%.