This paper addresses the problem of optimizing the packet transmission schedule in an ad hoc network with end-toend delay constraints. The emphasis is to determine the proper relative weights assigned to the remaining distance and the remaining lifetime in order to rank the urgency of a packet. We consider a general class of transmission schemes that represent such relative weights using a single lifetimedistance factor, which includes, as special cases, schedules such as Earliest-Deadline-First and Largest-Distance-First. We propose an analytical framework, based on recursive non-homogeneous Markovian analysis, to study the effect of the lifetime-distance factor on packet loss probability in a general multihop environment, with different configurations of peer-node channel contention. Numerical results are presented to demonstrate how various network parameters affect the optimal lifetime-distance factor. We demonstrate quantitatively how the proper balance between distance and lifet...