The ever-increasing deployment of cloud data centers causes high energy consumption, high cost, and harmful environmental pollution. To solve above problems, cloud service providers are actively exploring to use green cloud data centers (GCDCs) by using green energy. Yet it is challenging to accurately predict the future wind and solar energy before making intelligent task scheduling decisions. In addition, it is difficult to jointly optimize cost and revenue. In this work, to make optimal task scheduling, various types of applications, service level agreements, service rates, task loss probability, electricity prices and green energy in different GCDCs are considered. First, this work employs a long short-term memory network to predict wind and solar energy. Then, it adopts a bi-objective optimization algorithm to achieve a better trade-off between cost and revenue of GCDCs. Finally, it adopts real-world data including workload trace, wind energy, solar energy and electricity prices to demonstrate the effectiveness of the proposed energy prediction and task scheduling methods. It's shown that the proposed methods achieve higher performance than other neural network methods.