Quantum thermal machines can perform useful tasks, such as delivering power, cooling, or heating. In this work, we consider hybrid thermal machines, that can execute more than one task simultaneously. We characterize and find optimal working conditions for a threeterminal quantum thermal machine, where the working medium is a quantum harmonic oscillator, coupled to three heat baths, with two of the couplings driven periodically in time. We show that it is possible to operate the thermal machine efficiently, in both pure and hybrid modes, and to switch between different operational modes simply by changing the driving frequency. Moreover, the proposed setup can also be used as a high-performance transistor, in terms of output-to-input signal and differential gain. Due to its versatility and tunability, our model may be of interest for engineering thermodynamic tasks and for thermal management in quantum technologies.