We consider an automaton model that progresses spontaneously through the four successive phases of the cell cycle: G1, S (DNA replication), G2 and M (mitosis). Each phase is characterized by a mean duration t and a variability V. As soon as the prescribed duration of a given phase has passed, the transition to the next phase of the cell cycle occurs. The time at which the transition takes place varies in a random manner according to a distribution of durations of the cell cycle phases. Upon completion of the M phase, the cell divides into two cells, which immediately enter a new cycle in G1. The duration of each phase is reinitialized for the two newborn cells. At each time step in any phase of the cycle, the cell has a certain probability to be marked for exiting the cycle and dying at the nearest G1/S or G2/M transition. To allow for homeostasis, which corresponds to maintenance of the total cell number, we assume that cell death counterbalances cell replication at mitosis. In studying the dynamics of this automaton model, we examine the effect of factors such as the mean durations of the cell cycle phases and their variability, the type of distribution of the durations, the number of cells, the regulation of the cell population size and the independence of steady-state proportions of cells in each phase with respect to initial conditions. We apply the stochastic automaton model for the cell cycle to the progressive desynchronization of cell populations and to their entrainment by the circadian clock. A simple deterministic model leads to the same steady-state proportions of cells in the four phases of the cell cycle.