A Stochastic Model for the Unit Commitment (SUC) problem of a hybrid microgrid for a short period of 24 h is presented. The microgrid considered in the problem is composed of a wind turbine (WT), a photovoltaic plant (PV), a diesel generator (DE), a microturbine (MT) and a Battery Energy Storage System (BESS). The problem is addressed in three stages. First, based on the historical data of the demanded power in the microgrid, an ARMA model is used to obtain the demand prediction. Second, the 24-h-ahead SUC problem is solved, based on generators’ constraints, renewable generation and demand forecast and the statistical distribution of the error in the demand estimation. In this problem, a spinning reserve of the dispatchable units is considered, able to cover the uncertainties in the demand estimation. In the third stage, once the SUC problem has been solved, a case study is established in real time, in which the demand estimation error in every moment is known. Therefore, the objective of this stage is to select the spinning reserve of the units in an optimal way to minimize the cost in the microgrid operation.