The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automatic reboot

Discussion in 'General Discussion' started by andy_cul, Jul 28, 2005.

  1. andy_cul

    andy_cul Member

    Joined:
    May 12, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    How do I set this I would like to set my server on automatic reboot every 3hrs.
     
  2. tanfwc

    tanfwc Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Why would you like to do that?

    Maybe crontab will be a good method for you.
     
  3. andy_cul

    andy_cul Member

    Joined:
    May 12, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    because my server always hangs about 3-5 times a day.
     
  4. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    First of all try to locate the root cause of this hang-up...as rebooting so frequently is a bad idea...however u can edit crontab by >>

    Code:
    crontab -e
    and add following line >

    Code:
    0 */3 * * *  /sbin/reboot
     
    #4 nickb, Jul 29, 2005
    Last edited: Jul 29, 2005
  5. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    0 */3 * * * reboot

    will reboot server in every 3 hrs
     
  6. andy_cul

    andy_cul Member

    Joined:
    May 12, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
  7. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I would investigate this for an hardware issue if it hanged up every 3-5 hours or may be you have got a notorious user on your server. Any dmesg output to see whats up with it ?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    As has been said, rebooting your server every few hours is an extremely bad idea. You'd be much better resolving the cause of the problem and fixing it, as shashank has said.
     
  9. andy_cul

    andy_cul Member

    Joined:
    May 12, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    yes now I know whats the consequence on rebooting your server every few hours. now my server is down. Is there a way that I can retrieve all my datas? just recieved this email...

     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Only if your datacenter can/will install the new OS and cPanel on a new system disk and have your old disk mounted as a slave drive. You can then migrate all the cPanel and user data from the slave to the master drive.
     
Loading...

Share This Page