Commuters will get 24-hour trains in Sydney this weekend after the government caved to a union demand to stop potentially-crippling strikes.