LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-05-2006, 08:10 AM   #1
chobin
LQ Newbie
 
Registered: May 2006
Location: Italy
Distribution: Fedora Core 4 - Suse 10.0
Posts: 24

Rep: Reputation: 15
Automatic system shutdown


Hi friends,
I need to schedule a reboot of my linux system at a certain time. I tried to this using a cron job:
Code:
00 0 * * * /sbin/shutdown -r now
but a message say that only root can use shutdown command. How can I get root privileges?
Thanks
 
Old 06-05-2006, 08:35 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
su to root, and add the the cron job with
Code:
crontab -e
 
Old 06-05-2006, 08:51 AM   #3
chobin
LQ Newbie
 
Registered: May 2006
Location: Italy
Distribution: Fedora Core 4 - Suse 10.0
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by zaichik
su to root, and add the the cron job with
Code:
crontab -e
you are right zaichik! It was very simple.... I didn't remember that I can use root crontab too.
Thank you very much
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to shutdown xserver without automatic restart? Lotharster Linux - Newbie 4 02-08-2006 04:34 PM
Automatic shutdown using ping amelieo Linux - Networking 4 04-24-2004 04:59 AM
automatic shutdown in Mandrake 9.2 lu543285 Mandriva 1 02-13-2004 08:10 AM
automatic shutdown in Mandrake 9.2 lu543285 Linux - Hardware 1 02-13-2004 07:35 AM
Automatic shutdown NetScripter Linux - General 1 10-17-2002 02:45 PM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration