No crontab for root.

Discussion in 'HOWTO-Related Questions' started by newbie14, Oct 28, 2010.

  1. newbie14

    newbie14 New Member

    Dear All,
    I am setting my cron to work. I am in the root account/ So first I type as vi crontab -e. Then it ask me type "visual" for normal mode and do that then I type the following as below
    1 * * * * root usr/local/testClient/runClient.sh>/usr/local/testClient/cron1.log and press esc type wq. Then I restart the cron service /etc/init.d/crond stop and /etc/init.d/crond start. Lastly when I type crontab -l it tells me no crontab for root. So where did I go wrong any help please ?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    The correct command is
    Code:
    crontab -e
    , not vi crontab -e
     
  3. newbie14

    newbie14 New Member

    Dear Falko,
    Ok it is working now. But why is my /usr/local/testClient/cron1.log empty isnt it suppose to log each time the cron run? Thank you.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Did you test the command
    Code:
    usr/local/testClient/runClient.sh>/usr/local/testClient/cron1.log
    on the command line?

    (Shouldn't it be
    Code:
    [B][COLOR="Red"]/[/COLOR][/B]usr/local/testClient/runClient.sh>/usr/local/testClient/cron1.log
    ?)
     
  5. newbie14

    newbie14 New Member

    Dear Falko,
    Yes I have tried with the slash. What else must I do to make the log file to have values? Thank you.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Does the command
    Code:
    /usr/local/testClient/runClient.sh
    work if you run it manually? Does it generate any output?
     

Share This Page