The stochastic and intermittent nature of renewable energy poses grave challenges to the energy scheduling of micro-grids. The exploitation of batteries has been considered as an effective way to cope with such challenges. However, fluctuation in renewable process causes batteries to charge/discharge frequently, reducing the lifetime and increasing the maintenance cost. This paper presents a hierarchical two-layer energy management, a combination of battery and supercapacitor, to lessen daily energy costs. The upper layer is equipped with a battery to minimize the economic cost, optimizing the energy usage by employing a mixed-integer nonlinear programming (MINLP) model; the lower layer is equipped with a supercapacitor to treat the uncertain nature of renewable energy. The optimization process includes load shifting and battery degradation costs. The upper layer determines the optimal schedule of interruptible appliances and the profile for energy storage for the next 24 hours. The schedule results are then passed to the lower layer, which deals with the forecast uncertainties with a supercapacitor with a 15 minutes interval. The effectiveness of the proposed algorithm is examined by a single-layer scheduling system without forecast errors and a two-layer scheduling system with forecast errors. The obtained results show the capability and effectiveness of the proposed scheduling system to reduce operating costs and forecast errors.