#1  
Old 24th October 2005, 00:46
Joe-Montana Joe-Montana is offline
Junior Member
 
Join Date: Oct 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crontab

Have a simple file called my_webstatic.run

In that file is:
----------------

webalizer /var/log/httpd/access_log -o /var/www/html/webstatic/

-------------------


Now i want crontab to run it:
---------------------------------

05,10,15,20,25,30,35,40,45,50,55 * * * * /var/www/html/webstatic/my_webstatic.run -nice 19 /dev/null 2> /dev/null

This do not work, but when i run it like this everything is fine:


[root@localhost /]# webalizer /var/log/httpd/access_log -o /var/www/html/webstatic/
Webalizer V2.01-10 (Linux 2.6.11-6mdk-i686-up-4GB) English
Using logfile /var/log/httpd/access_log (clf)
Creating output in /var/www/html/webstatic/
Hostname for reports is 'sohigh.dk'
Reading history file... webalizer.hist
Error: Skipping oversized log record
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Warning: Truncating oversized referrer field
Warning: Truncating oversized request field
Warning: Truncating oversized referrer field
Generating report for October 2005
Generating summary report
Saving history information...
17143 records (1 bad) in 1.21 seconds, 14167/sec
[root@sohigh /]#


/Joe
Reply With Quote
  #2  
Old 24th October 2005, 00:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
Default

In the file my_webstatic.run you have to enter the full path to webalizer, e.g /usr/bin/webalizer and not only webalizer. When the script is run by cron, the Path variable is not set.
Reply With Quote
  #3  
Old 24th October 2005, 00:54
Joe-Montana Joe-Montana is offline
Junior Member
 
Join Date: Oct 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks all work now
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:44.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th