Analysis and experiments are carried out on a horizontal rectangular wave tank which swings at the lower end of a pendulum. The walls of the tank generate waves which affect the motion of the pendulum. For small displacements of the tank, linearised shallow water equations are used to model the motion, and there exist time-periodic solutions for the system whose periods are governed by a transcendental relation. Numerical and analytic solutions of this relation show that the fundamental period is greater than both the period of the empty tank (moving like a simple pendulum) and the fundamental period of the standing wave which occurs when the tank is removed from its supports and held fixed. For a rectangular tank the theory compares well with some experimental measurements. Qualitative observations are also made of the effect of breaking waves on the tank motion: for a tank which has a mass small compared with its load the energy dissipated by breaking waves can rapidly reduce the amplitude of swing of the tank. Potential flow theory is used with linearised free-surface boundary conditions to find time periodic motions for a tank with a hyperbolic cross section.