You are not logged in.
Pages: 1
How to shut down system at specific time?
Offline
One solution is to use cron
This web page explains it all very well https://www.centron.de/en/tutorial/linu … with-cron/
Go down to the section Advanced Scheduling of the Shutdown Command for the details you need but basically it is:-
$ sudo crontab -e no crontab for root - using an empty one
Select an editor. To change later, run 'select-editor'.
1. /bin/nano <---- easiest
2. /usr/bin/vim.basic
3. /usr/bin/vim.tiny
4. /bin/ed
Choose 1-4 [1]: 1 Make a selection and continue.
Note: Using sudo to edit the crontab means the command will run as the root user.
Next, add the following line:
0 23 * * * /usr/sbin/shutdown -h +30 "The system will shutdown in 30 minutes." Save and exit the editor.
Ctrl O to save then Ctrl X to exit This Cron Job schedules the system to power off every day at 23:30 with a 30 minute warning at 23:00. Adapt to the timings you require.
Offline
Pages: 1