LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shutdown or poweroff? (https://www.linuxquestions.org/questions/linux-newbie-8/shutdown-or-poweroff-540719/)

sirius56 03-26-2007 09:32 AM

shutdown or poweroff?
 
At the end of the day, I would like to turn my system off in an orderly way to conserve energy. I use crontab to do that.

If I use crontab to do /sbin/shutdown now , the system winds down in an orderly way, killing all applications and processes. However, shutdown ends in an apparent runlevel S1, with a text prompt. Power stays on.


If I use crontab to do /sbin/poweroff, my system immediately powers off. I'm just not sure that this happens in an orderly way, killing all processes, etc. BTW, acpid is running.

Please tell me the best way to turn off power in an orderly way.

henrysukumar 03-26-2007 09:47 AM

did you try shutdown -h now

-h stands for halt

sirius56 03-26-2007 09:58 AM

Henry, Putting /sbin/shutdown -h now in a crontab does exactly what I wanted . Thank you.

Case closed.

jonnycando 03-26-2007 11:10 AM

I use shutdown -r now while in terminal mode to effect a restart, but putting a shutdown in a crontab piques my curiosity. If I do that, and say schedule for some hour of the evening; that hour comes, and I am at the computer. When in an X session, Gnome for example, will a warning window popup broadcasting impending doom? Or would it just roll up and shutdown without ceremony? If the popup is supplied then it would seem oppurtune to adjust the command to allow a certain delay, thus I might save whatever open files I have. I know that can be done, I just never had a use for that facility. Putting it in crontab seems to make it de rigeur.


All times are GMT -5. The time now is 07:33 PM.