Smart electricity grids are a key component of the transition to renewable energy sources. At the heart of their demand-response management are online scheduling problems, for which we design and evaluate new algorithms using competitive analysis and machine-learning models to inform the decision-making process.