"crontab" to start the system automatically.
hi,
I am using Cent OS 5 for squid server. At night 8:00 pm the system turn off automatically by using schedual i.e "crontab" command . I want that the system should Turn ON automatically at 9:00 am. Is there any way crontab command ? or other procedure so that i may not manually on the system thanks gardenair |
AFAIK there are basically two methods to automatically turn on a computer. The BIOS if it has a wake up alarm function or with another computer using WOL.
|
Hello,
I'm not sure you can do that from within the system itself. If the server is turned off, there's no way it can start up by itself in my opinion. There might be an option available in your BIOS to boot the server automatically at a programmed time, but that depends on your BIOS so check there. Another option is to put your server in hibernate mode and use a script from another computer to boot it IF your NIC supports Wake on Lan (WOL). Kind regards, Eric |
Thanks for your replies. "EricTRA" as you mentioned
Code:
"Another option is to put your server in hibernate mode and use a script from another computer to boot it IF your NIC supports Wake on Lan (WOL)." 2-How can i check that my Lan card has Wake on Lan feature or not.Can we say that a Lan card which can boot over lan is called "Wake on Lan " ? thanks , gardenair |
Hello,
You can use the commands from the pm-utils package: Code:
pm-hibernate To check if your NIC supports WOL run ethtool: Code:
ethtool <yournic> Code:
eric@ericvs-laptop ~ $ sudo ethtool eth1 Kind regards, Eric |
In addition the BIOS must be set to allow WOL. There might be other settings to allow wake on LAN from standby or hibernate modes.
Booting from a LAN (PXE) is not the same thing as wake on LAN (WOL) |
thanks "EricTRA" for guiding. I want to clear my pactuere. I am using "crontab -e" and the script i am using is
Code:
00 20 * * * /sbin/shutdown -h now Again there are questions in my mind 1- After the execution of "crontab -e" coomand how the command how can the hibernation will work ? 2- Kindly guide me that what is pm-utils package from where i may download it ? 3- when i use teh command "ethtool eth0 it show me the following output Code:
[root@my-proxy ~]# ethtool eth0 thanks gardenair |
Hello,
1. If you shutdown your system completely with the command in your crontab then you are not in hibernation but a complete shutdown. Your wake on lan will work but will take significantly longer then when recovering from hibernation or suspend. If you want to use the hibernation method in order to start up faster, then you'll need the pm-utils package. 2. The pm-utils package can be installed using your package manager. In CentOS: Code:
yum install pm-utils Code:
Supports Wake-on: umbg Code:
Wake-on: g Kind regards, Eric |
I am so much thankful "EricTRA" for your help.Now the question is how to hibernate my system.After installing "yum install pm-utils " it will available ?
2- Using "crontab -e"how can I add my system into hibernate mode ? I mean what will be the complete command that the system should hibernate at 8:00 pm ? thanks gardenair |
Hello,
Yes, after installing pm-utils you'll have the command pm-hibernate available to put your system in hibernation instead of completely turning off. That will result in faster booting when needed. Instead of using your shutdown command in crontab, put the hibernate command in there to replace shutdown. Have a look at the man page once you installed the pm-utils package. Kind regards, Eric |
All times are GMT -5. The time now is 05:49 PM. |