An Efficient Energy Harvesting Based Scheduling Technique for Wireless Sensor Networks