In terms of the operation of microgrids, optimal scheduling is a vital issue that must be taken into account. In this regard, this paper proposes an effective framework for optimal scheduling of renewable microgrids considering energy storage devices, wind turbines, micro turbines. Due to the nonlinearity and complexity of operation problems in microgrids, it is vital to use an accurate and robust optimization technique to efficiently solve this problem. To this end, in the proposed framework, the teacher learning-based optimization is utilized to efficiently solve the scheduling problem in the system. Moreover, a deep learning model based on bidirectional long short-term memory is proposed to address the short-term wind power forecasting problem. The feasibility and performance of the proposed framework as well as the effect of wind power forecasting on the operation efficiency are examined using IEEE 33-bus test system. Also, the Australian Wool north wind site data is utilized as a real-world dataset to evaluate the performance of the forecasting model. Results show the effective and efficient performance of the proposed framework in the optimal scheduling of microgrids.