Prevent your Mac from going to sleep mode for any time period you like.
Turn off, lock, sleep, log off and restart your Mac.
This app allows you to remotely switch on every Wake On Lan capable device.