We present a feedback-corrected optimal scheduling approach to reduce the demand of electrical energy of batch processes, exemplified at the sand preparation in foundry. The main energy driver in the exemplary foundry is the idle time of the batch-wise working sand mixers. In this novel approach, we use linear integer programming to minimize the demand of energy of the sand mixers by scheduling the batches in real-time. For the optimization we use a physical model of the sand preparation, which takes dwell-times of the processes as dead-time systems into account. In this paper, we present the steps to make the optimal scheduling approach applicable for the production process. The application at the real production plant proves the performance of the suggested approach. Compared to the conventional control, the feedback-corrected optimal scheduling approach leads to an reduction in energy consumption of approximately 6.5 % without modifying the process or the aggregates.