Controlling the machine power state by switching off/on the machine when idle is one of the most promising energy efficient measure for machining processes. Part arrival process is affected by uncertainty and acquiring knowledge to obtain a proper and updated control model is difficult in industrial practice. Hence, control policies should be connected to the shop floor exploiting data acquired on-line. This work extends an on-line time-based policy recently proposed in the literature by including constraints on machine performance. A novel optimization algorithm is proposed to minimize energy consumption while assuring a target production rate and mitigating the risk of incurring in unexpected high energy consumption. Moreover, the policy ...