Many manufacturing companies are always looking for a way to reduce energy consumption by utilizing energy-efficient production methods. These methods can be different depending on the type of products and production technology. For instance, one of the ways to increase energy efficiency and keep the precision of production is to use robots for the transportation of the parts among the machines and loading/unloading the machines. This technology is affordable compared to the technologies used in manufacturing companies. Manufacturing companies that rely on robotics technology must have a strategy to reduce energy costs and at the same time increase production by adjusting the intensity of processing or controlling the production rate. This study presents an exact solution method for flexible robotic cells to control the production rate and minimize energy consumption, which aims to both reduce electricity prices and minimize greenhouse gas (GHG) emissions under a lead time of production. Then, considering the NP-hardens nature of the problem, a heuristic solution method based on the genetic algorithm (GA) is proposed. Using the proposed approach, manufacturing companies will be able to make more accurate decisions about processing intensity and process scheduling while ensuring sustainability.