LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 10:20 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration