Scheduled shutdown

Associate
Joined
18 Oct 2002
Posts
2,188
I have some machines at work that i need to schedule to shutdown at a certain time due to power being switched off to the building in the early hours.

Some machines are running mandriva 10 and others mandriva 2006.

Is it possible to shutdown the servers at a set time? for example 03:00?

I have looked on google and the best result i could find would be to use the following in the konsole:

/sbin/shutdown -r hh:mm

I tried this as well as just shutdown -r hh:mm, and i also tried replacing the -r for a -h but none of them worked.

Any ideas?
 
kiwi said:
sudo crontab -e -u root

add this:
0 03 * * * /sbin/shutdown -h now

voila.

I've tried running this but it didnt work. When i typed that into Konsole all i got was the following:

cron.jpg


I can't see how to enter it into there.

I also tried manually going into the /etc folder and editing the crontab file but it didnt do anything from there either.
 
Back
Top Bottom