Microgrids have been recognised as one of the most promising but challenging research topics over the last decade. The optimal energy scheduling problem is regarded as the most essential aspect in the tertiary level control in microgrids. However, most existing centralised or distributed scheduling models only focus on the logical and dynamical feature of microgrids' operation or the non-linear power flow constraint, which would overact the system performance without considering appropriate unit commitment requirements. Moreover, applying decomposition and iteration technics to complex scheduling problems would encounter convergence issues. To address this concern, this study presents a mixed integer linear reformulation to characterise the operation of different controllable devices and convex relaxation techniques to cope with nonlinear power flow constraints, leading to a mixed integer second-order cone programming framework in a concordant yet computationally efficient pattern, capturing non-linear, logical and dynamical properties of the optimal energy scheduling problem in microgrids. The effectiveness of the proposed framework is validated on the IEEE 33-bus distribution network with both grid-connected and islanded modes.