A solar fence works like an electric fence which delivers a brief yet fierce shock when human beings or animals come in contact with the fence. The shock enables a deterrent effect while ensuring that no loss of life is caused. Depending on sunlight hours and capacity, a solar fencing system's battery can generally last for as long as 24 hours in a day.