We propose a sensor network based novel strategy for BEMS (Building Energy Management System). The strategy is to minimize the total cost of energy for a finite period by efficiently controlling energy flows with predicting and monitoring those flows based on the sensor network in buildings. The proposed strategy includes prediction, long-term scheduling, and prediction error update within a building. During the period, the process from the prediction to the update is iterated in every time unit when the system status is changed by a dynamic environment. The scheduler determines the optimal energy flows based on the prediction, and the updated error by a dynamic environment is finally fed back for the next iteration. Simulation results indicate potential cost savings that are approximately 10∼20% compared to a typical BEMS with a conventional RTC (real-time control) scheme.