This paper proposes a method to maximize the lifetime of a cluster-tree ZigBee network under the constraint that every data flow should deterministically meet its end-to-end deadline for hard real-time sensing/control applications. The proposed method decomposes the network-wide optimization problem into a set of per-cluster optimization problems and hence can find a near optimal solution with a low complexity.