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 a cron in ssh using root

Discussion in 'General Discussion' started by shanit, Apr 24, 2006.

  1. shanit

    shanit Well-Known Member

    Joined:
    Dec 18, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hi I am attempting to put in
    crontab -e when in ssh and it tells me this

    root@server [~]# crontab -e
    /bin/sh: pico: command not found
    crontab: "pico" exited with status 127

    can someone help me fix this issue I think when i had my other server i had same problem and someone told me something to do and it fixed it. but now i have a new one and its been a while since i had to do it. Thanks

    Shannon
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    pico is set as a default editor on your server and it seems it is not installed. To change the default editor to 'vi', do the following :-
    ]# which vi << This will give you the path for 'vi'.
    ]# export EDITOR= path/of/vi << normally it will be /bin/vi or /usr/bin/vi.

    To check whether the default editor is changed :-
    ]# set | grep EDITOR

    Editor is now changed to 'vi'. Now you can use 'crontab -e' to edit cronjob's on server.

    OR install pico.
     
  3. nettigritty

    nettigritty Well-Known Member
    PartnerNOC

    Joined:
    Jan 21, 2004
    Messages:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore, India
    You might have nano instead. create a symlink from pico to nano. that should work.
     
Loading...

Share This Page