This paper studies the resource allocation problem of a single cell powered jointly by renewable energy and power grid over a given time period (e.g. 24 hours), using statistical information of traffic intensity and harvested energy. Specifically, the problem is formulated as minimizing the average grid power input while satisfying users’ quality of service (outage probability) requirements. We analyze the outage probability, and solve the grid power minimization problem indirectly by obtaining a power-outage tradeoff curve using the dynamic programming (DP) approach. Some heuristic algorithms are proposed and compared with the DP algorithm by simulations. The results show that the DP algorithm greatly reduces the grid power consumption compared with the heuristic methods, among which the joint traffic-energy-aware resource allocation performs closest to the optimal solution.