Using the example of a two-layer energy management system for remote microgrids, a novel scheduling algorithm is proposed that considers the battery lifetime and is expected to reduce the operational cost of the microgrid. This method combines the objectives of minimizing fuel consumption and battery degradation costs into a single weighted goal.