It can depend on the type of generator, the type of battery it uses, and the amount of power it supplies. Generally speaking, generators should only be left running if they are plugged into an outlet and turned off the breaker. Be sure to know your generator's fuel capacity and have enough fuel to last the length of time you plan on keeping the generator running. It is also good to keep an emergency shutoff switch nearby in case of a power outage.