This paper is concerned with scheduling of demand response among different residences and a utility company. The utility company has a cost function representing the cost of providing energy to end-users, and this cost can be varying across the scheduling horizon. Each end-user has a “must-run” load, and two types of adjustable loads. The first type must consume a specified total amount of energy over the scheduling horizon, but the consumption can be adjusted across different slots. The second type of load has adjustable power consumption without a total energy requirement, but operation of the load at reduced power results in dissatisfaction of the end-user. The problem amounts to minimizing the total cost electricity plus the total user dissatisfaction (social welfare), subject to the individual load consumption constraints. The problem is convex and can be solved by a distributed subgradient method. The utility company and the end-users exchange Lagrange multipliers-interpreted as pricing signals-and hourly consumption data through the Advanced Metering Infrastructure, in order to converge to the optimal amount of electricity production and the optimal power consumption schedule.