Maximizing the utility under energy constraint is critical in an Internet of Things (IoT) sensing service, in which each sensor harvests energy from THE ambient environment and uses it for sensing and transmitting the measurements to an application server. Such a sensor is required to maximize its utility under THE harvested energy constraint, i.e., perform sensing and transmission at the highest rate allowed by the harvested energy constraint. Most existing works assumed a sophisticated model for harvested energy, but neglected the fact that the harvested energy is random in reality. Considering the randomness of the harvested energy, we focus on the transmission scheduling issue and present a robust transmission scheduling optimization approach that is able to provide robustness against randomness. We firstly formulate the transmission scheduling optimization problem subject to energy constraints with random harvested energy. We then introduce a flexible model to profile the harvested energy so that the constraints with random harvested energy are transformed into linear constraints. Finally, the transmission scheduling optimization problem can be solved traditionally. The experimental results demonstrate that the proposed approach is capable of providing a good trade-off between service flexibility and robustness.