With the rapid development of cloud computing, the issue of how to reduce energy consumption has attracted a great deal of attention. Especially for dynamic workflow scheduling, dependency constraints between tasks and high quality of service requirements, such as real-time requirements and deadline constraints, make it very challenging. This paper focuses on the energy-efficient scheduling problem, which jointly considers the impact of finer-grained tasks with CPU and memory configurations on energy con-sumption. A dynamic workflow scheduling simulator is developed to mim-ic the scheduling process in real-world scenarios. Then, we propose a Coop-erative Coevolution Genetic Programming to learn heuristics for both the task selection decision and the instance selection decision, using the simu-lator for heuristic evaluation. The scheduling heuristics obtained by Coop-erative Coevolution Genetic Programming evolution can then be used to make real-time decisions in dynamic environments. The simulation results show that the proposed method has managed to obtain better scheduling heuristics than the baseline methods in terms of energy consumption and resource utilization.