Although energy management of a microgrid is generally performed using a day-ahead scheduling method, its effectiveness has been questioned by the research community due to the existence of high uncertainty in renewable power generation, power demand and electricity market. As a result, real-time energy management schemes are recently developed to minimise the operating cost of a microgrid while high uncertainty presents in the network. This paper develops modified particle swarm optimisation (MPSO) algorithms to solve optimisation problems of energy management schemes for a community microgrid and proposes a scheduling approach after taking into consideration high uncertainty to effectively minimise the operational cost of the microgrid. The optimisation problems are formulated for real-time and scheduling approaches, and solution methods are developed to solve the problems. It is observed that the scheduling program demonstrates superior performance in all the cases, including uncertainty in prediction, as compared to the other energy management approaches, although solutions have significant deviations due to prediction errors.