LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2009, 12:53 AM   #1
qarqeaan
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Reboot Lunix fedora core 3


Hi every one

I like to reboot my server every day
when I type
crontab -l

it give me :

59 04 * * * /root/boot.sh

my boot.sh is:
#!/bin/sh
reboot

but it doesn't work with me ?
any help

thank u all
 
Old 03-04-2009, 01:28 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Try

Code:
#!/bin/sh
/sbin/reboot
But is this job run as root? If not then you will need to give user the permissions to run the reboot command.

Have you looked in /var/log/cron to confirm that your script did not run?
 
Old 03-04-2009, 04:33 AM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Always back to Fedora
Posts: 267

Rep: Reputation: 54
make sure that the cron job is for root. So su - (enter root password), then
# crontab -e

add your line

59 04 * * * /root/boot.sh

save the crontab file

Test to see it worked by "crontab -l" - this will list the crontab file

and make sure that your boot.sh file has the _full_ pathname to reboot as described above, for example /sbin/reboot

Check to see that it has worked by looking at the /var/log directory. Good luck.
 
  


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
Setup Fedora core 3 & Redhat 7.2 software development environment under Fedora core 5 powah Fedora 1 06-16-2006 10:25 AM
Rhythmbox on Fedora Core 3 causes reboot! SolidSnakeX28 Linux - Software 1 05-28-2005 08:47 PM
Fedora Core 3 shutdown and reboot max_232 Linux - Laptop and Netbook 3 03-29-2005 08:35 AM
Mysterious reboot Fedora Core 2 install atkdabomb Fedora - Installation 1 10-26-2004 02:02 PM
After installation of Fedora Core I and reboot mouse and keyboard will not work wheckel Fedora 3 03-03-2004 10:54 AM


All times are GMT -5. The time now is 09:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration