We address the problem of determining in an optimal way the sequence of times at which a firm can enter or exit an economic activity. In particular, we consider an investment model which involves production scheduling as well as a sequence of entry and exit decisions. The pricing of an investment conforming with this model gives rise to a stochastic impulse control problem that we explicitly solve. Our solution takes qualitatively different forms, depending on the problem's data.