Quantum communication enables the implementation of tasks that are unachievable with classical resources. However, losses on the communication channel preclude the direct long-distance transmission of quantum information in many relevant scenarios. In principle, quantum repeaters allow one to overcome losses. However, realistic hardware parameters make long-distance quantum communication a challenge in practice. For instance, in many protocols an entangled pair is generated that needs to wait in quantum memory until the generation of an additional pair. During this waiting time the first pair decoheres, impacting the quality of the final entanglement produced. At the cost of a lower rate, this effect can be mitigated by imposing a cutoff condition. For instance, a maximum storage time for entanglement after which it is discarded. In this article, we optimize the cutoffs for quantum repeater chains. First, we develop an algorithm for computing the probability distribution of the waiting time and fidelity of entanglement produced by repeater chain protocols which include a cutoff. Then, we use the algorithm to optimize cutoffs in order to maximize the secret-key rate between the end nodes of the repeater chain. In this article, we find that the use of the optimal cutoff extends the parameter regime for which secret key can be generated and, moreover, significantly increases the secret-key rate for a large range of parameters.