Wireless sensor networks (WSNs) are composed of sensors exchanging the information that they collect from the environment. The use of a scheduler offers an efficient solution to eliminate information redundancy and possible collisions in this network.A scheduler is responsible for choosing the sensors to exchange information at each step of the algorithm's execution. This article presents a WSN handshake algorithm (WSN-HS) scheduling the communications between every two sensors safely in an exclusive mode. Our WSN-HS is energy-efficient. It tries to elaborate communications between sensors with the minimum of messages and thus with the minimum of energy consumption. In addition, our algorithm is fault-tolerant to sensors' disappearance.Hence, when a sensor runs out of energy, the other sensors in the network will not be blocked and they will continue executing the distributed algorithm. We compare and evaluate our algorithm with another handshake algorithm. The results of the simulation done with two examples of distributed algorithms show that our algorithm significantly minimizes the energy consumption in the WSN. Moreover, in this article, we detail the analysis that emphasizes the efficiency of our WSN-HS algorithm.