Adding gas to a generator while it's running is not recommended although it can be done safely.
The reason why you're not supposed to add gas to a generator while it's running is because you could spill some gas on the hot engine, hot exhaust etc and cause a fire or explosion.
I have however added gas to my generator while it was running for a long time and never had any issue.
I just make sure to pour the gas in slowly and be careful about it.
During a wind storm that took out the power for a week I had a generator running all the time to have electricity and about every 3 hours I would go out and top off the gasoline tank to keep it running.
Never once did I shut the generator down to refuel and it kept running all that time until the power came back on and I shut it off and checked the oil which was also fine.
If you're not sure if you can go without spilling gasoline then it's best to shut the generator off for a few minutes or so and allow it to cool down while you add some fuel.
Although generators can run for a long time it's okay to give it a break once in awhile and it will save you money on gasoline if you don't need it running constantly.
If you don't have enough fuel then you should only run it as much as you need too.
But if you have enough fuel then you can run it all day and all night if you need to or want too.