You can do so by launching shutdown.exe -s -t 0 using a scheduled task, but it's always advisable to verify if no users are logged on before shutting down the computer. The task should shut down the system automatically only if no users are logged on.