Most previous studies of epidemic dynamics on complex networks suppose that the disease will eventually stabilize at either a disease-free state or an endemic one. In reality, however, some epidemics always exhibit sporadic and recurrent behaviour in one region because of the invasion from an endemic population elsewhere. In this paper we address this issue and study a susceptible-infected-susceptible epidemiological model on a network consisting of two communities, where the disease is endemic in one community but alternates between outbreaks and extinctions in the other. We provide a detailed characterization of the temporal dynamics of epidemic patterns in the latter community. In particular, we investigate the time duration of both outbreak and extinction, and the time interval between two consecutive inter-community infections, as well as their frequency distributions. Based on the mean-field theory, we theoretically analyse these three timescales and their dependence on the average node degree of each community, the transmission parameters and the number of inter-community links, which are in good agreement with simulations, except when the probability of overlaps between successive outbreaks is too large. These findings aid us in better understanding the bursty nature of disease spreading in a local community, and thereby suggesting effective time-dependent control strategies. © IOP Publishing and Deutsche Physikalische Gesellschaft.