If at any time the magistrate refuse or fail to perform the duties of his office, or in case of his absence or inability to act, it is hereby made the duty of any justice of the peace within said city to perform the duties of said magistrate, with all the jurisdiction conferred by law upon said magistrate; provided, however, that said mayor and council may designate the particular justice who shall exercise said jurisdiction, in which case no other justice shall possess the same.