Aerial Base Stations (ABSs) promise resilient and perpetual connectivity after unexpected events such as natural disasters. However, the deployment and scheduling of ABSs introduce several algorithmic challenges. In particular, on-demand communication can change over time and be hard to accurately predict, so it needs to be handled in an online manner, accounting also for battery consumption constraints. This paper presents AirNet, an efficient software-based solution to operate ABSs whichmeet these requirements. AirNet is based on an efficient placement algorithm for ABSs which maximizes the number of covered users, and a scheduler which navigates and recharges ABSs in an energy-aware manner. To this end, we propose an energy-aware deployment algorithm and use an energy model to analyze the power consumption and thereby, improve the flight endurance. In addition, we evaluate a novel scheduling mechanism that efficiently manages the ABSs' operations. Our simulations indicate that our approach can significantly improve the flight endurance and user coverage compared to a recent state-of-the-art approach.