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.

Cron Job for locally installed AWStats

Discussion in 'General Discussion' started by drm, Jan 20, 2004.

  1. drm

    drm Member

    Joined:
    Dec 13, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I have installed AWStats onto a clients webspace so that they can access their stats without having access to CPanel. The configuration seems to work fine and the stats are correctly updated when updating via the browser link.

    I want to update the stats using a cron job rather than give the client the opportunity to repeatedly update via the browser.

    Can anyone help me with the cron job command syntax I should use for this?

    Any help would be appreciated
     
  2. Crundy

    Crundy Active Member

    Joined:
    Oct 9, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    perl /path/to/awstats.pl -config=www.sitename.com -update=1
     
  3. drm

    drm Member

    Joined:
    Dec 13, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks. I tried it but it didn't work, nothing happened.

    Any suggestions?
     
  4. Crundy

    Crundy Active Member

    Joined:
    Oct 9, 2003
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Did it email you the standard output? If so, what did it say? If not, then the cronjob didn't run.
     
  5. drm

    drm Member

    Joined:
    Dec 13, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I get the following error message in the email:

    "Error: AWStats database directory defined in config file by 'DirData' parameter (../webstats) does not exist or is not writable."

    The files in this folder update fine when using the browser link. Do I need different permissions when using the cron job?
     
  6. drm

    drm Member

    Joined:
    Dec 13, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    It works now, although I'm not sure why it didn't before....

    I changed 'DirData' parameter from ../webstats to /webstats and it was ok.

    The problem I was originally having was because I didn't precede the command with perl. So thanks for your help with that.


    :)
     
Loading...

Share This Page