darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
126 stars 36 forks source link

cron job set but not working in centos 6.5 64bit #82

Closed robetus closed 9 years ago

robetus commented 9 years ago

I inserted this: 0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1

into /etc/crontab and it does not do anything. I want the log to refresh every day. What else can I check to make this work?

darold commented 9 years ago

squid-analyzer must be run as root or any user able to read your squid log files and to write in the output directory. Maybe there's something wrong but it should show an error. First you have to try to run it manually and see if there's any error message. Second send any error message to a file and not to /dev/null:

0 2 * * * /usr/local/bin/squid-analyzer > /tmp/squidanalyzer.log 2>&1

and report any error message available in this file.

Regards

robetus commented 9 years ago

Do I use:

0 2 * * * root /usr/local/bin/squid-analyzer > /tmp/squidanalyzer.log 2>&1
darold commented 9 years ago

yes