How to turn off the system automatically ?
How to turn off the system automatically ?
Hi,
I am using Cent Os 5. I want that the system should shutdown automatically at 7:00 pm daily and next day I manually turn on the system.I have google it but the syntax is not clear.
I use
# crontab -e
and write the command
0 19 * * * /sbin/shutdown -h now
I does't apply the command but please guide me that what is * * * after 19
Kindly guide me how can I enable this feature? and If i want to shutdown the system at 7:30 PM then how will it write ?
thanks in advance,
garden
I am using Cent Os 5. I want that the system should shutdown automatically at 7:00 pm daily and next day I manually turn on the system.I have google it but the syntax is not clear.
I use
# crontab -e
and write the command
0 19 * * * /sbin/shutdown -h now
I does't apply the command but please guide me that what is * * * after 19
Kindly guide me how can I enable this feature? and If i want to shutdown the system at 7:30 PM then how will it write ?
thanks in advance,
garden
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi
thanks again for the reply. well I am not an expert in Linux but i am working on it each day.I have configured squid in my office and it is functional. Each day I discover new thing and it is helping me a lot for improving my linux in Linux.
Well I have also studies the man pages and it is wonderfull and have lot of things inside it. Well I have also tried with
0 14:30 * * * /sbin/shutdown -h now
but unfortunately it does not shutdown the system. Any idea thing missing I think
Well I have also studies the man pages and it is wonderfull and have lot of things inside it. Well I have also tried with
0 14:30 * * * /sbin/shutdown -h now
but unfortunately it does not shutdown the system. Any idea thing missing I think
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi
it will working as a cron job and i must be as below
30 14 * * * /sbin/shutdown -h now
study RHCE guide by Michele Jang it is awesome
30 14 * * * /sbin/shutdown -h now
study RHCE guide by Michele Jang it is awesome
Last edited by Kamran.Ahmed on Mon Mar 14, 2011 3:11 pm, edited 1 time in total.
-
- Lance Naik
- Posts: 45
- Joined: Wed Dec 16, 2009 5:57 pm
- Location: Karachi