Generally we can set scheduler for turn on and off a machine by Power Managing… Read the postCrontab + Pmset on Macintosh