-   SUSE / openSUSE (
-   -   Howto schedule shutdown daily (

drsethi 04-29-2009 11:14 AM

Howto schedule shutdown daily
I want to schedule shutdown my computer daily at 08:00:01 AM.
Describe the method with Kcron or any other software

colucix 04-29-2009 12:26 PM

You can easily set up a crontab to do the job. Open a terminal and switch to root (since only root can use the shutdown command):

su -
then edit the root's crontab using

crontab -e
now you are into the vi editor. Add the following line:

0 8 * * * /sbin/shutdown -h now
save and quit and the trick is done. If you don't know how to use the vi editor, just press "a" to insert new text, type the text (the above line) then press "Esc". To save and quit digit ":wq!", then press enter. If you prefer to use a graphical editor, just set the environment variable EDITOR to the name of your favorite editor, for example:

export EDITOR=kwrite
then issue the crontab -e command. This time a session of kwrite pops up. Put the same crontab entry, save an quit.

About using kcron, you can find instructions here.

All times are GMT -5. The time now is 04:26 AM.