Enable F1 through F12 as standard keys or use them for quick system controls ...
This article explains how to prevent your Mac from going to sleep, including instructions to schedule an automatic sleep time ...