Good day, Please help. I have Debian 12.5 installed no graphical environment How do I set the server shutdown at a given time every day? Thank you Martin Svoboda
Why do you ever want to shut a server down as it normally needs to be on 24/7, however, if you mean a reboot, when there is a need for it, then it should be fine. Anyway, to achieve any of that, you should learn what is cron job and then, simply create a cron job for what you want.
Using cron, as root enter to root crontab the line Code: 05 06 * * * /sbin/shutdown -h now That does shutdwon at 5 minutes past 6 in the morning. Adjust time if needed. Another way, if you only want this occasionally and do not want to idly wait near the host until suitable reboot time, is command at. That allows typing the command now but executing it at the given time. On Debian GNU/Linux it is in package at.