LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 09-12-2004, 05:13 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Rep: Reputation: 32
CRON Job


Can any one help me please. I've been on this for a few days now, read a ton of pages but i'm realy foxed on this one, unless i'm missing some thing.

OS if fedora core 2 with awstats 6.1

does this look right ?

0 2 * * * /usr/local/awstats/tools ./awstats_updateall.pl

I'm having aliitle trouble getting rid of an error, thinking the olny thing i got to do is the cronjob hoping that will fix the the error message on top of my FTP and Mail stats
Never updated (See 'Build/Update' on awstats_setup.html page)

TT

Last edited by tommytomato; 09-12-2004 at 05:15 AM.
 
Old 09-12-2004, 07:37 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
Quote:
does this look right ?
0 2 * * * /usr/local/awstats/tools ./awstats_updateall.pl
are you trying to run

/usr/local/awstats/tools/awstats_updateall.pl?

If this is the case, then the above cron entry is wrong.

OR are you trying to
cd to /usr/local/awstats/tools and then run the pl script?
In this case, you should
cd /usr/local/awstats/tools && ./awstats_updateall.pl
but /usr/local/awstats/tools/awstats_updateall.pl does the same thing

Can you tell us how you would run the awstats_updateall.pl from the command line?
 
Old 09-12-2004, 07:50 AM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
I use the command

./awstats_updateall.pl

but to do them all its like so

./awstats_updateall.pl now

with in the directory

Code:
[root@localhost root]# cd /usr/local/awstats
[root@localhost awstats]# cd tools/
[root@localhost tools]# pwd
/usr/local/awstats/tools
[root@localhost tools]# ls
awstats_buildstaticpages.pl  configure.pl        maillogconvert.pl   xslt
awstats_exportlib.pl         httpd_conf          urlaliasbuilder.pl
awstats_updateall.pl         logresolvemerge.pl  webmin
[root@localhost tools]#
TT
 
Old 09-12-2004, 07:57 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
in that case, your cronjob should be changed to

0 2 * * * /usr/local/awstats/tools/awstats_updateall.pl
 
Old 09-12-2004, 08:03 AM   #5
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
Thank you

Just a question is that going to email me every time it updates,
i think i set it to every 2 hours i wanted to test it first to see if it was going to do it.

if you get my dift.

here is what i have

TT

Last edited by tommytomato; 09-12-2004 at 08:57 AM.
 
Old 09-12-2004, 08:30 AM   #6
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
Quote:
Just a question is that going to email me every time it updates,
i think i set it to every 2 hours i wanted to test it first to see if it was going to do it.
No, actually the script will run at 2 am everyday. If you want it to run every 2 hours, change it as

* */2 * * * /usr/local/awstats/tools/awstats_updateall.pl
 
Old 09-12-2004, 08:52 AM   #7
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
thanks again ppuru

I should have said will that show up in my watch log ?

i have my watch log sent to my mail box every day

Code:
[root@localhost root]# crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.12899 installed on Sun Sep 12 21:55:46 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 2 * * * /usr/local/awstats/tools/awstats_updateall.pl

[root@localhost root]#
I dont spose you can tell me why i get this message

Never updated (See 'Build/Update' on awstats_setup.html page)

TT

Last edited by tommytomato; 09-12-2004 at 09:15 AM.
 
Old 09-13-2004, 12:19 AM   #8
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
do you edit your crontab with

crontab -e OR

vi /etc/crontab?

The first one is the safer way.
 
Old 09-13-2004, 12:21 AM   #9
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
Using this

crontab -e


this is what i got back today from the cron mail

----- awstats_updateall 1.0 (build 1.9) (c) Laurent Destailleur -----
awstats_updateall launches update process for all AWStats config files (except
awstats.model.conf) found in a particular directory, so you can easily setup a
cron/scheduler job. The scanned directory is by default /etc/awstats.

Usage: awstats_updateall.pl now [options]

Where options are:
-awstatsprog=pathtoawstatspl
-configdir=directorytoscan


i dont think it worked

TT
 
Old 09-13-2004, 12:26 AM   #10
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
I had tried out awstats just once ... bit flaky ... that message obviously means that you need to pass some required parameters.

You can either do it at the cronjob line itself OR
write a small script and have cronjob execute the script

The script file can be something simple like

#!/bin/sh
# Awstats updateall script
/usr/local/awstats/tools/awstats_updateall.pl <the options>
 
Old 09-13-2004, 12:34 AM   #11
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
So i can edit the file using crontab -e

edit waht i have to look like so

0 2 * * * /usr/local/awstats/tools/awstats_updateall.pl now

TT
 
Old 09-13-2004, 12:35 AM   #12
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 46
yes, you can do that ...

first make sure the same command works well at the command line ... that is not asking/waiting for additional options.
 
Old 09-13-2004, 12:38 AM   #13
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 935

Original Poster
Rep: Reputation: 32
ok thanks

I was using this from the command line

./awstats_updateall.pl now

TT
 
  


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
Cron Job petenyce Linux - Newbie 5 10-11-2005 04:03 PM
cron job working2hard Programming 6 07-28-2004 09:12 PM
cron job ? johnyy Linux - Software 3 12-10-2003 06:00 PM
Cron Job imanahmadi Linux - Newbie 1 07-03-2003 11:39 PM
cron job? luap Linux - Software 2 03-16-2003 08:48 AM


All times are GMT -5. The time now is 06:05 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