Welcome to Fishlore! Tiger barbs will need a much larger tank than 5 gallons and they like to be kept in groups. Also water changes, assuming they are in a cycled tank should be done every week in most cases. In a tank that size it should be even sooner. If it isn't cycled I would get a test kit and prime. I would either rehome it or get a larger tank.
Generally, you can let your nitrate level be your guide. Ideally you want your nitrates to be under 20ppm at all times. But even if you could go more than a week due to low nitrates, I would still do at least a small water change weekly, since the new water will have more oxygen and it will also replace the diminished minerals.
But with that said, I agree with the others in that you need a larger tank and a proper school