Cloud data centers provide all kinds of service using hundreds of thousands of servers. This naturally leads to concerns about the effect on environment such as carbon emissions and global warming. Huge amounts of effort have been devoted to power-aware scheduling using renewable energy. However, the intermittent availability of the renewable energy brings us a new challenge: how to dynamically distribute the requests to the data centers that are powered by renewable energy, while minimizing carbon emissions under a fixed electricity budget. In this paper, we model our problem as a constraint optimization problem. The goal is to minimize the carbon emissions of the data centers by using renewable energy while satisfying: (1) the request processing time constraint; (2) the total electricity budget in each time slot; (3) the intermittent supply of the renewable resources; (4) the maximal number of servers in each data center. We solve the problem by ingeniously transforming it into an integer linear programming model, and calculate the decision variables using existed method. Experiments show that our scheduler can minimize carbon emissions using renewable resources, while satisfying the constraints mentioned above.