Max-plus algebra is a suitable algebraic setting to model discrete event systems involving synchronization and delay phenomena which are often found in transportation networks, communications systems, and manufacturing systems. One way of controlling this kind of systems consists in choosing the dates of input events in order to achieve the desired performances, e.g., to obtain output events in order to respect given dates. This kind of control is optimal, according to a just-in-time criterion, if the input-event dates are delayed as much as possible while ensuring the output events to occur before a desired reference date. This paper presents the observer-based controller for max-plus linear systems where only estimations of system states are available for the controller. As in the classical sense, this is a state-feedback control problem, which is solved in two steps: first, an observer computes an estimation of the state by using the input and the output measurements, then, this estimated state is used to compute the state-feedback control action. As a main result, it is shown that the optimal solution of this observer-based control problem leads to a greater control input than the one obtained with the output feedback strategy. A high throughput screening example in drug discovery illustrates this main result by showing that the scheduling obtained from the observer-based controller is better than the scheduling obtained from the output feedback controller.