Abstract Technological development was not always environmental-friendly but it led to problems that affect the entire population, such as climate change and the depletion of non-renewable resources. In recent years, we are trying to change the concept of industrialization, with a more prudent and focused view to environmental issues. In this perspective, the setting of the fourth industrial revolution, called Industry 4.0, seeks to make technological development sustainable with the crucial aim of resource saving firstly. Starting by this issue, this study aims at introducing a smart tool, based on the application of a mathematical model, already proposed in literature, for the job scheduling from an energy saving perspective into a real company IT system. After a preliminary introduction on the concepts of sustainability and industry 4.0, and how they are connected to each other, and a second part that will deal with Smart Factory, smart factories oriented to customization and flexibility, the mathematical model of activity scheduling will be discussed and than applied to a specific IT system. This model, in fact, properly implemented into a Manufacturing Execution System (MES) will represent a powerful tool oriented to the efficient use of energy resources.