Nonautonomous driving of an oscillator has been shown to enlarge the Arnold tongue in parameter space, but little is known about the analogous effect for a network of oscillators. To test the hypothesis that deterministic nonautonomous perturbation is a good candidate for stabilizing complex dynamics, we consider a network of identical phase oscillators driven by an oscillator with a slowly time-varying frequency. We investigate both the short- and long-term stability of the synchronous solutions of this nonautonomous system. For attractive couplings we show that the region of stability grows as the amplitude of the frequency modulation is increased, through the birth of an intermittent synchronization regime. For repulsive couplings, we propose a control strategy to stabilize the dynamics by altering very slightly the network topology. We also show how, without changing the topology, time-variability in the driving frequency can itself stabilize the dynamics. As a byproduct of the analysis, we observe chimeralike states. We conclude that time-variability-induced stability phenomena are also present in networks, reinforcing the idea that this is a quite realistic scenario for living systems to use in maintaining their functioning in the face of ongoing perturbations.