A 30 gallon heater can be cycled in less than 20 minutes---meaning the entire 30 gallons of hot water is used`---and the useage flow is high enough to prevent the incoming water to be heated.
If the problem is new---meaning the water heater is sized correctly for your family, and the heater is electric, one of the heating elements has burned out or one of the element thermostats is not working.
If the heater is gas, the thermostat could be malfunctioning.