To support the shop-floor operators, decision support systems (DSS) are becoming more and more vital to the success of manufacturing systems in industry today. In order to get a DSS able to adapt to disturbances in a production system, on-line data are needed to be able to make optimal or near-optimal decisions in real-time (soft real-time). This paper investigates one part of such a system, i.e. how different priorities of maintenance activities (planned and unplanned) affect the productivity of a production system. A discrete-event simulation model has been built for a real-world machining line in order to simulate the decisions made in subject to disturbances. This paper presents a way of prioritizing operators and machines based on multiple criteria such as competence, utilization, distance, bottleneck, and Work-In-Process. An experimental study based on the real-world production system has shown promising results and given insights of how to prioritize the operators in a good way. Another novelty introduced in this paper is the use of simulation-based optimization to generate composite dispatching rules in order to find good tradeoffs when taking a decision of which machine or operator to select.