LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-06-2003, 04:44 PM   #1
WiWa
Member
 
Registered: Aug 2003
Distribution: Redhat 9.0, Fedora Core, Suse 9.1, Mandrake
Posts: 82

Rep: Reputation: 15
Crontab


I'm having a problem with crontab. I'm using the below cron file, called stats.cron, where most of the entries are supposed to generate HTML files (for the program awstats)

For some strange reason, cron only executes the first two commands successfully. It looks like all the other entries are skipped and not executed.

When using the "/usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert .........." separately on my machine, it executes perfectly.

I do crontab stats.cron and then verify if it is correct through crontab -l. It shows the content of the file.

- anyone can see a mistake in the below file
- is there a place where I can find debug info on cron?

1 0-23/1 * * * /usr/bin/webalizer
5 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -update
7 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=allhosts -staticlinks>awstats.wauters-mannaert.allhosts.html
7 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=lasthosts -staticlinks>awstats.wauters-mannaert.lasthosts.html
7 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=unknownip -staticlinks>awstats.wauters-mannaert.unknownip.html
7 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=alllogins -staticlinks>awstats.wauters-mannaert.alllogins.html
8 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=lastlogins -staticlinks>awstats.wauters-mannaert.lastlogins.html
8 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=allrobots -staticlinks>awstats.wauters-mannaert.allrobots.html
8 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=lastrobots -staticlinks>awstats.wauters-mannaert.robots.html
8 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=urldetail -staticlinks>awstats.wauters-mannaert.urldetail.html
9 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=urlentry -staticlinks>awstats.wauters-mannaert.urlentry.html
9 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=urlexit -staticlinks>awstats.wauters-mannaert.urlexit.html
9 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=browserdetail -staticlinks > awstats.myvirtualhostname.browserdetail.html
9 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=osdetail -staticlinks>awstats.wauters-mannaert.osdetail.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=unknownbrowsers -staticlinks > awstats.wauters-mannaert.unknownbrowsers.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=unknownos -staticlinks>awstats.wauters-mannaert.unknownos.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=refererse -staticlinks>awstats.wauters-mannaert.refererse.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=refererpages -staticlinks>awstats.wauters-mannaert.refererpages.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=keyphrases -staticlinks > awstats.wauters-mannaert.keyphrases.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=keywords -staticlinks > awstats.wauters-mannaert.keywords.html
10 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=errors404 -staticlinks > awstats.wauters-mannaert.errors404.html
 
Old 10-06-2003, 05:20 PM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
Error messages are usually sent to email.
Some things I noticed on your redirect it just has a filename not the entire path.
So change
7 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=allhosts -staticlinks>awstats.wauters-mannaert.allhosts.html
to
7 0-23/1 * * * /usr/local/apache/cgi-bin/awstats.pl -config=wauters-mannaert -output=allhosts -staticlinks> /usr/local/apache/htdocs/awstats.wauters-mannaert.allhosts.html

I'm not really familliar with the 0-23/1... every hour? If you have it running every hour why not just put *
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab x2??? killahsmurf Slackware 2 05-24-2005 10:53 PM
Crontab wormraper Debian 4 05-15-2005 01:01 AM
How to use crontab ? Dakkar Linux - Newbie 2 01-22-2004 10:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
HELP!! crontab karleong Linux - General 9 07-12-2003 10:54 AM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration