We consider a single-server queue with unlimited waiting space, the first-come, first-served discipline, a periodic arrival-rate function, and independent and identically distributed service requirements, where the service-rate function is subject to control. We previously showed that a rate-matching control, whereby the service rate is made proportional to the arrival rate, stabilizes the queue-length process but not the (virtual) waitingtime process. To minimize the maximum expected waiting time (and stabilize the expected waiting time), we now consider a modification of the service-rate control involving two parameters: a time lag and a damping factor. We develop an efficient simulation search algorithm to find the best time lag and damping factor. That simulation algorithm is an extension of our recent rare-event simulation algorithm for the GI t /GI/1 queue to the GI t /GI t /1 queue, allowing the time-varying service rate. To gain insight into these controls, we establish a heavy-traffic limit with periodicity in the fluid scale. This produces a diffusion control problem for the stabilization, which we solve numerically by the simulation search in the scaled family of systems with ρ ↑ 1. The state space collapse in that theorem shows that there is a time-varying Little's law in heavy traffic, implying that the queue length and waiting time cannot be simultaneously stabilized in this limit. We conduct simulation experiments showing that the new control is effective for stabilizing the expected waiting time for a wide range of model parameters, but we also show that it cannot stabilize the expected waiting time perfectly. History: Former designation of this paper was SSy-2018-012.R2.