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.

Setting Roots Crontab

Discussion in 'General Discussion' started by Justin22, Oct 30, 2005.

  1. Justin22

    Justin22 Member

    Joined:
    Oct 24, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hey everyone, i have a general server question. Before I go ahead and ask I will let you know im using FC4 with "Minimal" features on the install. I want to update roots crontab to automatically run a necessarry script every 2 minutes. Yes thats easy, but, when i type crontab -e at a root shell, i get this error:

    /bin/sh: pico: command not found
    crontab: "pico" exited with status 127

    Anyone know a way i could maybe download the crontab file? And edit it on my windows system then restart? If so, were is this file? Specific instructions please Linux n00b here :rolleyes:
     
  2. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    You could try the following command:
    # alias pico='nano -w -z'
    # crontab -e

    Another way of adding your script as a cron would be:
    # cat > /etc/cron.d/mycronfiletorunmyscript
    SHELL=/bin/bash
    0/2 * * * * root /path/path/path/myscript -parameters
    {PRESS CTRL+D to save the file}

    hth
     
  3. Justin22

    Justin22 Member

    Joined:
    Oct 24, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for you hep
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Or, perhaps more simply:

    cd /usr/bin
    ln -s v nano pico
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Make that

    Code:
    ln  -sv nano  pico
    or alternatively you may get "yum install pico" to work, I don't know whether they're the same program or not!
     
Loading...

Share This Page