This paper addresses the robust consensus problem under switching topologies. Contrary to existing methods, the proposed approach provides decentralized protocols that achieve consensus for networked multi-agent systems in a predefined time. Namely, the protocol design provides a tuning parameter that allows setting the convergence time of the agents to a consensus state. An appropriate Lyapunov analysis exposes the capability of the current proposal to achieve predefined-time consensus over switching topologies despite the presence of bounded perturbations. Finally, the paper presents a comparison showing that the suggested approach subsumes existing fixed-time consensus algorithms and provides extra degrees of freedom to obtain predefined-time consensus protocols that are less over-engineered, i.e., the difference between the estimated convergence time and its actual value is lower in our approach. Numerical results are given to illustrate the effectiveness and advantages of the proposed approach.