How to keep Macbook Pro on all night?

I am trying to download the Mac OS X El Capitan but I tried to download at night. I left my computer charging all night and set it to no sleep but it still powered off? It cancelled the download when it powered off and the download starts from the beginning if your computer turns off

SilverTonguedDevil2016-06-01T08:40:21Z

Favorite Answer

"How to keep Macbook Pro on all night?

1. Move the sleep slider to NEVER.
2. DO NOT close the lid.
3. Plug the power adapter into a wall outlet THAT IS NOT TURNED OFF BY A WALL SWITCH.
4. Plug the MagSafe end into the computer.

That is all you need, so do all four of these and Bob's your uncle.

Reasons why the power fails:
– Thunderstorm.
– Loose connection on the power adapter's MagSafe plug.
– Wall switch turns off the outlet socket.

<0-0>

Anonymous2016-06-01T08:17:57Z

Try Caffeine...

https://itunes.apple.com/app/caffeine/id411246225?mt=12