Automatic/manual use

With a crontab
  • Unix

    Cron-w3perl.pl have been introduced to avoid lots of lines in your crontab and it will compute the scripts in the right order. So just use this one please.

    You should have permission to execute cron commands (ask your administration system if you can't). Use telnet to connect and type the command 'crontab -e' to edit your crontab. A editor should then be available. Write the full pathname for the files to run.

    You only have to add this line in your crontab :

    • standard :
      01 00 * * * /<full_path>/w3perl/cron-w3perl.pl -e > /dev/null
    • to load a configuration file :
      01 00 * * * /<full_path>/w3perl/cron-w3perl.pl -e -c /<full_path>/w3perl/config-oj.pl > /dev/null
    • hourly update :
      01 * * * * /<full_path>/w3perl/cron-w3perl.pl > /dev/null
    Then check via 'crontab -l' your entry is valid.

    - Redirection to /dev/null is used to cancel messages report. Delete it if you want to get a report from the crontab.
    - The '-e' is here to launch all scripts in an incremental way to save CPU. You only need to launch this script ONCE a day if you're using this flag.
    - If you need more stats update (once every hour), just add cron-w3perl.pl without any flag (except the '-c' flag if you need to load a specific configuration file). Default should be ok for most people but if you need more control, edit the script, you'll be able to specify when each script will be run.

  • NT

    NT users can't use cron-w3perl so they need to add one line for each script in their scheduler event (Unix look like :). Use the command 'at'
    Core scripts
    10 00 * * * /norfolk/www/w3perl/cron-inc.pl > /dev/null
    01 * * * * /norfolk/www/w3perl/cron-hour.pl > /dev/null
    00 01 * * * /norfolk/www/w3perl/cron-day.pl > /dev/null
    30 01 * * 1 /norfolk/www/w3perl/cron-week.pl > /dev/null
    00 02 1 * * /norfolk/www/w3perl/cron-month.pl > /dev/null

  • Cron-inc will be run each night at 00:10, it should be the first to run as it produces results files for the other programs except cron-hour.pl You should have run cron-pages.pl once before after installing the package !
  • Cron-hour.pl is running every hour.
  • Others programs should be run later when cron-inc has finished its works.

    Optionnal scripts
    03 00 * * 1 /norfolk/www/w3perl/cron-url.pl > /dev/null
    30 02 * * 1 /norfolk/www/w3perl/cron-session.pl > /dev/null
    35 03 * * 1 /norfolk/www/w3perl/cron-agent.pl > /dev/null
    40 03 * * 1 /norfolk/www/w3perl/cron-refer.pl > /dev/null
    45 03 * * 1 /norfolk/www/w3perl/cron-error.pl > /dev/null

  • Cron-url.pl will output a file for URL to document's title conversion. You could run it every day just before cron-inc.pl. I've choose to run it only once a week as I don't have a lots of new html pages every day !
  • cron-refer, cron-agent don't have to be run if you don't use a httpd which log the referer and agent information.
  • Cron-session can take a while if you have very large log file.

    You will receive an email on the morning telling you what's wrong if you've got trouble.


  • Without a crontab
  • Unix

    New in version 2.40, cron-w3perl.pl can be launch to run all incremental script one by one. NT can't use cron-w3perl, sorry.

    You'll need to call it via the -e flag (cron-w3perl.pl -e).

    You need to launch it at least once a week.

  • NT

    Execute the program at the commands line. Use '-h' to see options available.
    After having configured the config.pl script, you can run cron-pages.pl. Wait for the process to finish and check the result. Never use again cron-pages now, use instead cron-inc.pl, it will compute incremental stats by scanning only the previous day. Cron-inc is able to scan the 7 last previous day, so you don't have to run it daily if you want. If you forget to run it for a week or more, run cron-pages or use the -s option in cron-inc (but it will be faster to use cron-pages if you are very late).
    So run :

    • cron-pages for the first time or if you forget to run cron-inc for a while.
    • cron-inc for a daily incremental stats
    Then run :
    • cron-hour to have hourly stats (each hour)
    • cron-day to have daily stats (once a day)
    • cron-week to have weekly stats (once a week)
    • cron-month to have monthly stats (once a month)
    Except for hourly stats, the results will be updated from the last time you ran the scripts...you won't loose any data if you don't run the scripts every day.

    If you don't see a link for the monthly or weekly stats, the reason is your logfile doesn't contains enough data to compute them at the moment. To have more information, you can run optionnal scripts :

    • cron-agent to have agent stats
    • cron-refer to have referer stats
    • cron-url to have stats about your web pages (a map between url and name of the HTML document is also done)
    • cron-session to have session stats
    • cron-error to have error stats
    You can run them when you want ; once a week is enough for me. You will need to wait a day for having a link from the homepage as the update is made by cron-inc.

  • back