This paper studies the optimal control of an infectious spread based on common epidemic models with permanent immunity and no vaccine availability. Assuming limited isolation control and capacity constraints on the number of infections, an optimal quarantine control strategy that balances between the total number of infections and the overall isolation effort is derived from necessary optimality conditions. The specific optimal policy is then obtained by optimizing the switching times of this generalized strategy. In the case of a newly emerged disease, these results can be used in a data-driven receding horizon manner to improve actions as more data becomes available. The proposed approach is applied to publicly available data from the outbreak of SARS-CoV-2 in Germany. In particular, for minimizing the total number of infections or the number of isolated individuals, the simulations indicate that a sufficiently delayed and controlled release of the lock-down are optimal for overcoming the outbreak. The approach can support public health authorities to plan quarantine control policies.