In what circumstances could a 787 stay powered on continuously for 248 days?
Aircrews seldom have to power off an aircraft completely (also known as a cold and dark cockpit). Airliners usually stay powered on at the gate. This is known as a "short turn-around": engines are stopped, the APU is stopped, but electrical power and air conditioning is still supplied by ground equipment.

This has the advantage of minimizing turn-around time (after all, airliners are meant to stay in the air to make money). The cabin also has to be cleaned and prepared for the next flight at this time, so something must power the lights.

It is theoretically possible to stay on this way for 248 days. However, airliners have scheduled maintenance, which completely powers off the aircraft. They are also powered off if the expected time at the gate is long. So, in reality, it's very unlikely to have an airliner powered continuously for 248 days.