Event-driven systems and thread-driven systems are two major design philosophies of operating system in wireless sensor networks. Systems based on multi-threaded are more timeliness than the event-driven systems, which can meet the requirements of time-critical tasks by means of task preemption, while systems based on event-driven are more energy efficient.The article introduces a task scheduling module in event-driven system. The module takes a kind of priority table query method to choose the most important task with highest priority to schedule.It is seen that the module is suitable wireless sensor network.