First off chlorine is not a metal so you can ignore that one.
Sodium and Rubidium are in group 1 of the periodic table and Magnesium is in group 2.
Group one metals are more reactive than group two because it is harder for the group two metals to lose their 2 valence (outer most) electrons.
As you go down group 1 there is an increase in the reactivity this is because as you go down there is an increase in the atomic radius which leads to more shielding. This weakens the electrostatic forces of attraction making it easier to lose the outermost electrons, therefore they are more reactive.
Because the valence shell of gases wants to become full
C6H12O6 + O2 = CO2 + H2O
Balanced Equation:
1 = C6H12O6
6 = O2
6 = CO2
6 = H2O