#1  
Old 23rd October 2005, 23: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
Sponsored Links
  #2  
Old 23rd October 2005, 23:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,403
Thanks: 834
Thanked 5,494 Times in 4,325 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 23rd October 2005, 23: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 17:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.