Whether an idea, information, or infection diffuses throughout a society depends not only on the structure of the network of interactions, but also on the timing of those interactions. People are not always available to interact with others, and people differ in the timing of when they are active. Some people are active for long periods and then inactive for long periods, while others switch more frequently from being active to inactive and back. We show that maximizing diffusion in classic contagion processes requires heterogeneous activity patterns across agents. In particular, maximizing diffusion comes from mixing two extreme types of people: those who are stationary for long periods of time, changing from active to inactive or back only infrequently, and others who alternate frequently between being active and inactive.