The paper proposes a formulation for profit-based optimal generation scheduling by a microgrid (μgrid). Current methods normally assume either islanded operation, or utilitygrid connected μgrid but lacking in market participation elements. The paper addresses this gap whereby the formulated objective function allows for autonomous decision-making to determine the hour by hour optimal dispatch of generators subject to system constraints including market parameters. The distributed generations in the modelled μgrid consist of wind turbines, microturbines and photovoltaic arrays while the system inputs are based on tropical conditions. A case study on the difference between grid-connected and islanded operation is presented. The results demonstrate the efficiency of using genetic algorithm to solve the optimization problem.