Way to shut the PC down at a specific preset time?
James Tappin
sjt at star.sr.bham.ac.uk
Thu Apr 20 13:01:57 UTC 2006
On Thu, 20 Apr 2006 07:44:41 -0500
"Anthony D." <anthony75a at gmail.com> wrote:
AD> Hello...
AD>
AD> Is there a way to make Ubuntu shut a PC down automatically at a preset
AD> time each day? All I can find so far is the screensaver's "shut off
AD> after x minutes" function, which isn't what I'm looking for... thanks!
AD>
AD> Anthony
AD>
AD>
You could add a shutdown command to the root crontab. e.g. if you want the machine to shutdown at midnight you might add:
55 23 * * * /sbin/shutdown -h +5
which will give any users 5 minutes to tidy up.
I'm not sure if the right command is:
sudo crontab -e
or:
sudo crontab -u root -e
For details of what all the fields mean you need to look at:
man 5 crontab
James
--
+------------------------+-------------------------------+---------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt at star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+---------+
More information about the ubuntu-users
mailing list