View previous topic :: View next topic |
Author |
Message |
justincataldo Guru


Joined: 15 Jun 2005 Posts: 376 Location: Australia
|
Posted: Mon Oct 16, 2006 12:04 am Post subject: Turn machine on/off. |
|
|
In Apple OSX you can schedule a time for the machine to boot and turn off all by itself.
How the hell does it do that? Via a cron job?
Can this be done in linux? |
|
Back to top |
|
 |
Freakazoid Tux's lil' helper

Joined: 13 Apr 2004 Posts: 104
|
Posted: Mon Oct 16, 2006 12:09 am Post subject: Re: Turn machine on/off. |
|
|
justincataldo wrote: | In Apple OSX you can schedule a time for the machine to boot and turn off all by itself.
How the hell does it do that? Via a cron job?
Can this be done in linux? |
don't see why it could't be done in linux, provided proper ACPI support for software power off is compiled in the kernel.
I can think of one of two methods of doing this: cron (I think), and "at" (totally forget which package has "at" unfortunately)
basically you'd just schedule a "poweroff" or a "shutdown -t now" whever you want the machine to turn itself off. |
|
Back to top |
|
 |
justincataldo Guru


Joined: 15 Jun 2005 Posts: 376 Location: Australia
|
Posted: Mon Oct 16, 2006 12:10 am Post subject: |
|
|
I see.
What about turning the machine on? |
|
Back to top |
|
 |
Headrush Watchman


Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Mon Oct 16, 2006 12:11 am Post subject: |
|
|
Yes you can do that with cron. (as root at least)
Just execute the command "shutdown -h now".
The are several GUI for easily setting the cron command and time. (kcron for example)
Edit: Damn, guess someone types faster. 
Last edited by Headrush on Mon Oct 16, 2006 12:31 am; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55239 Location: 56N 3W
|
Posted: Mon Oct 16, 2006 12:13 am Post subject: |
|
|
justincataldo,
You can set an alarm in the BIOS to wake up and boot. I'm not sure if that can be set from within Linux, probably not, because all BIOSes store settings differently although the Real Time Clock interface is standard.
You can't easly set a shutdown time but the shutdowm command takes a delay parameter in mimutes,
So shuts down in five minutes time. You could write a script to do arethmetic on the time. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
|