One of the most known applications of Discrete Optimization is on scheduling. In contrast, one of the most known applications of Continuous Nonlinear Optimization is on the control of dynamic systems. In this paper, we combine both views, solving scheduling problems as dynamic systems, modeled as discrete-time nonlinear optimal control problems with state and control continuous variables subjected to upper and lower bounds. The proposed formulation has the following advantages over discrete (mixed-integer) models: a smaller number of variables is employed, and no 0-1 variable is needed. Therefore, the scheduling problem can be solved as a standard continuous nonlinear program. Complementarity constraints are used to represent scheduling decisions, defining a nonconvex problem, which can be solved with Global Optimization (GO) and Nonlinear Programming (NLP) methods. Applications with a continuous process background are discussed, such as the ones from petroleum and water & wastewater industries, because they pose challenging issues, with a combination of nonlinear and combinatorial aspects. One example we discuss in detail is the crude oil scheduling in ports, with tanks, pipelines, jetties, and tanker vessels and blending operations. The recent literature on this problem is rich in mixed-integer linear programming (MILP) models, therefore we developed a procedure to reformulate certain mixed-integer constraints as complementarity constraints, discarding the associated binary variables. The resulting NLP model is equivalent to the original MILP, in a sense that a feasible point in the NLP is also a feasible point in the MILP. A number of numerical cases are discussed to illustrate the validity of this approach. Despite obtaining good results with the NLP approach, we acknowledge that the MILP has the desirable feature of having only global optima, whereas the NLP is non-convex. Therefore, we present an hybrid NLP-MILP scheme that uses the NLP to generate new MILP integral solutions, which can serve as an upper bound to branch-and-bound procedures. Numerical results are presented, showing a significant reduction of Simplex iterations and branched nodes if we start the MILP optimization run with a NLP solution.