Scheduling tasks in production facilities are usually hybrid optimization problems of a large combinatorial nature. They involve solving, in near-real time, the integration of the operation of several batch units of continuous dynamics with the discrete manufacture of items in processing lines. Moreover, one has to deal with uncertainty (process delays, unexpected stops) and the management of shared resources (energy, water, etc.) including decisions made by plant operators: still, some tasks in the scheduling layers are done manually. Manufacturing Execution Systems (MESs) are intended to support plant personnel at this level. However, there is still much work to do in terms of performing automatic scheduling, computed in real time, that guides managers to achieve an optimal operation of such complex cyber-physical systems. This work proposes a closed-loop approach to handle the uncertainty arising when facing the online scheduling of supply lines and parallel batch units. These units often share some resources, so effects due to concurrent resource consumption on the system dynamics are explicitly considered in the presented formulation. The proposed decision support system is tested onsite in a tuna cannery, to handle short-term online scheduling of sterilization processes that deal with limited steam, carts, and operators as shared resources.