More and more cloud data centers are turning to leverage on-site renewable energy to reduce power cost for sustainable development. But how to effectively coordinate the intermittent renewable energy with workload remains to be a great challenge. This paper investigates the problem of workload scheduling for power cost minimization under the constraints of different Service Level Agreements (SLAs) of delay tolerant workload and delay sensitive workload for green data centers in a smart grid. Different from the existing studies, we take into consideration of the impact of zero price in the smart grid and the cost of on-site renewable energy. To handle the randomness of workload, electricity price and renewable energy availability, we first formulate the problem as a constrained stochastic problem. Then we propose an efficient online control algorithm named ODGWS (Online Delay-Guaranteed Workload Scheduling) which makes online scheduling decisions achieve a bounded guarantee from the worst scheduling delay for delay tolerant workload. Compared with the existing solutions, our ODGWS decomposes the problem into that of solving a simple optimization problem within each time slot in O(1) time without needing any future information. The rigorous theoretical analysis demonstrates that our algorithm achieves a [O(1V),O(V)] cost-delay tradeoff, where V is a balance parameter between the cost optimality and service quality. Extensive simulations based on real-world traces are done to evaluate the performance of our algorithm. The results show that ODGWS saves about 5% average power cost compared with the baseline algorithms.