We consider two queueing control problems that are stochastic versions of the economic lot scheduling problem: A single server processes N customer classes, and completed units enter a finished goods inventory that services exogenous customer demand. Unsatisified demand is backordered, and each class has its own general service time distribution, renewal demand process, and holding and backordering cost rates. In the first problem, a setup cost is incurred when the server switches class, and the setup cost is replaced by a setup time in the second problem. In both problems we employ a long-run average cost criterion and restrict ourselves to a class of dynamic cyclic policies, where idle periods and lot sizes are state-dependent, but the N classes must be served in a fixed sequence. Motivated by existing heavy traffic limit theorems, we make a time scale decomposition assumption that allows us to approximate these scheduling problems by diffusion control problems. Our analysis of the approximating setup cost problem yields a closed-form dynamic lot-sizing policy and a computational procedure for an idling threshold. We derive structural results and an algorithmic procedure for the setup time problem. A computational study compares the proposed policy and several alternative policies to the numerically computed optimal policy.