- Wireless sensor networks represent a new generation of real time traffic communications and high data rate sensor applications such as structural health monitoring and control. In this work we study some problems of data gathering in sensor networks. The information that the sensor collect about their environment must be delivered in timely fashion to collecting central processing system. We prove in this research that finding the optimal schedule in order to minimize the maximal delivery time with restrictions on the total idle time allowed in a general network topology with a single designated destination base station is NP-hard. We also refer to a special case of linear network topology for which we present several optimization algorithms: First we present an algorithm to minimize the number of tardy messages. We then present an algorithm to minimize the maximal lateness. Finally, we present an algorithm to minimize the maximal completion time. All of the scheduling optimization algorithms.