A problem to determine a production schedule which minimises the cost of energy used for manufacturing is studied. The scenario assumes that each production task has assigned constant power consumption, price of power from conventional electrical grid system is defined by time-of-use tariffs, and a component of free of charge renewable energy is available for the manufacturing system. The objective is to find the most cost-efficient production plan, subject to constraints involving predefined precedence relationships between the tasks and a bounded makespan. Two independent optimisation approaches have been developed, based on significantly different paradigms, namely mixed-integer linear programming and tabu search metaheuristic. Both of them have been verified and compared in extensive computational experiments. The tabu search-based approach has turned out to be generally more efficient in the sense of the obtained objective function values, but advantages of the use of linear programming have also been identified. The results confirm that it is possible to develop efficient computational methods to optimise energy cost under circumstances typical of manufacturing companies. The set of numerous benchmark instances and their solutions have been archived and it can be reused in further research.