Since the lifetime of a battery directly impacts the extent and duration of sensor networks, one of the key considerations in the design of sensor networks is the ability to maximize battery lifetime. In this paper, we present (1) a task modeling methodology and (2) a battery-aware real-time task scheduling technique for sensor networks. The task modeling is achieved based on task classification in terms of the usage of resources on a micro-sensor system. For exploiting the $\bf{Recovery Effect} of battery, that is, strategically allocating relaxation time to the battery, the battery-aware task scheduling algorithm composed of three phases is designed to maximize the lifetime of a battery lifetime and meet the timing constraints of each task. The results are achieved through the experiment are based on the $\bf{High-level analytical battery model}, and show that the extent of the improvement achieved by applying the proposed battery-aware task scheduling algorithm varies according to the characteristics of profiles.