The conversation on this page has been archived and is no longer active.

Put mac to sleep from commandline

Message #1 - Posted 2007/08/18 - randolf balasus

Hello, I want put my apple into the suspend to ram state over the commandline interface. Anybody lnows how to do that?

For instance the computer is playing music and after two hours all applications should stop and the computer should shutdown. Til now I am using
# sleep 120m ; shutdown -h now

that is working fine but it is not required that the computer completely goes down.

thanks Randolf Balasus

Message #2 - Posted 2007/08/18 - Randy Adamczyk

On 2007-08-18 08:25:33 +0200, randolf balasus said:

Hello, I want put my apple into the suspend to ram state over the commandline interface. Anybody lnows how to do that?

For instance the computer is playing music and after two hours all applications should stop and the computer should shutdown. Til now I am using
# sleep 120m ; shutdown -h now

that is working fine but it is not required that the computer completely goes down.

i don't know the proper unix command to do this, but i use this as a workaround:

download this little sleep automator action [1] and in automator create a script with it. save it as "application", and you'll be able to execute it from the command line with the "open" command.

so long,
randy

Message #3 - Posted 2007/08/18 - Randy Adamczyk

On 2007-08-18 15:42:49 +0200, Randy Adamczyk said:

download this little sleep automator action [1]

sorry, forgot to paste the link:
http://www.apple.com/downloads/macosx/automator/sleep.html

randy

Message #4 - Posted 2007/08/19 - randolf balasus

Randy Adamczyk wrote:

On 2007-08-18 15:42:49 +0200, Randy Adamczyk said:

download this little sleep automator action [1]

sorry, forgot to paste the link:
http://www.apple.com/downloads/macosx/automator/sleep.html

randy

Thanks this works very well !!!!! that was exaactly what I need. Greetings Randolf Balasus

Message #5 - Posted 2007/08/19 - Calum

randolf balasus wrote:

Randy Adamczyk wrote:

On 2007-08-18 15:42:49 +0200, Randy Adamczyk said:

download this little sleep automator action [1]

sorry, forgot to paste the link:
http://www.apple.com/downloads/macosx/automator/sleep.html

randy

Thanks this works very well !!!!! that was exaactly what I need. Greetings Randolf Balasus

FWIW, if you still want to do it from the command line, here's one solution: http://www.majid.info/mylos/weblog/2003/12/05-1.html

Need Help? Have a Question?

Looking for more help, comments, and answers?

Ask your questions on Ask Different. Ask Different is a community of Apple users ready to help.