Cronjob for Webalizer

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Cronjob for Webalizer

Postby DeathGoth » 06. October 2004 06:09

I am fairly new to linux, however I set up a xampp server cause I used it for a year or so on windows and figured i would move it to a linux box just cause its more stable. anyway...

I am wondering how to set up a cronjob for webalizer in xampp.. I am not sure on how to do this or even remotely able to.. so anyway help would be great.

thanx

DeathGoth
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02

Postby Kristian Marcroft » 06. October 2004 06:48

Hi,

enter on your shell:
crontab -e

then add this to your crontab:
15,30,45,00 * * * * /opt/lampp/bin/webalizer 2&>1

Exit and restart cron.
This will update webalizer every 15 mins.

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby DeathGoth » 06. October 2004 07:46

KriS wrote:Exit and restart cron.


How does one exactly restart a cron, as in just save it and hope it works or what???

told ya I was new to linux.. I need an book for dummies or something..

anyway thanx for your help Kris.
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02

Postby Kristian Marcroft » 06. October 2004 07:51

Hi,

if you use SuSE try:

rccron restart

any other Linux should do by doing a:

/etc/init.d/cron restart

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby DeathGoth » 06. October 2004 08:17

I did that, and it gave me this message.

[root@localhost root]# /etc/init.d/cron restart
-bash: /etc/init.d/cron: No such file or directory


SO I am wondering if I did something wrong...
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02

Postby Kristian Marcroft » 06. October 2004 08:19

Hi,

no maybe not...

Try this:

/etc/init.d/cro +press Tab

This will complete. Some Linux Distributions call it crond
Others dont eben have init.d so maybe you telling us what Distribution you use will help?

So long
KriS

btw. I always use /et + Tab -> /etc/ini + Tab -> /etc/init.d/cr + Tab -> /etc/init.d/cron

If you press Tab twice, it will show you the possibilities...
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby DeathGoth » 06. October 2004 08:23

sorry about that..

I am running redhat 9
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02

Postby DeathGoth » 06. October 2004 08:27

[root@localhost root]# /etc/init.d/crond
1 .gnupg .openoffice
.addressbook .gstreamer .pinerc
.addressbook.lu .gtkrc .qt
anaconda-ks.cfg .gtkrc-1.2-gnome2 .recently-used
.bash_history .ICEauthority .rhn-applet.cache
.bash_logout .icons .rhn-applet.conf
.bash_profile Installing-VNC.ppt .rnd
.bashrc install.log rpmfiles
.cshrc install.log.syslog .sversionrc
dns2go-2.0 .kde .tcshrc
.esd_auth .kdevelop-doc .themes
.fonts.cache-1 mail .thumbnails
.gaim .mailcap .Trash
.gaimrc .mcop .user60.rdb
.gconf .metacity .viminfo
.gconfd .mime.types .vnc
.gftp .mozilla .Xauthority
.gnome .nautilus .xmms
.gnome2 .neditdb .Xresources
.gnome2_private .netscape .xscreensaver
.gnome-desktop .netscape6 .xsession-errors


Those are my Choices.
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02

Postby Kristian Marcroft » 06. October 2004 08:32

DeathGoth wrote:[root@localhost root]# /etc/init.d/crond

Try

/etc/init.d/crond restart

I'm sorry, I have never had a Redhat so I can't really tell you 100% what to do.

If everything fails (I hate having to say this), you can still reboot...

So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby DeathGoth » 06. October 2004 08:36

I found a bunch of folders that go like this.

with a cron for webalizer in it but its diffrent..

#! /bin/bash
# update access statistics for the web site

if [ -s /var/log/httpd/access_log ] ; then
/usr/bin/webalizer
fi

exit 0


anyway this is an image of the cron set up in linux.. I am thinking it goes in here.. but I am not sure how to set it up for a cron.. cause they look like they got lil gears on it..
http://deathgoth.sytes.net:9000/files/i ... enshot.png

maybe if we edit the code above for webilizer we can change it to work with xampps version.
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02

Postby Kristian Marcroft » 06. October 2004 08:44

DeathGoth wrote:I found a bunch of folders that go like this.

with a cron for webalizer in it but its diffrent..

#! /bin/bash
# update access statistics for the web site

if [ -s /var/log/httpd/access_log ] ; then
/usr/bin/webalizer
fi

exit 0



You will still have to restart cron, so your not one step further than now ;)
you may also edit the file you found... but then webalizer will only update your stats every hour.

If you would like to change it, it would have to look like this:
Code: Select all
#! /bin/bash
# update access statistics for the web site

if [ -s /opt/lampp/logs/access_log ] ; then
    /opt/lampp/bin/webalizer
fi

exit 0


So long
KriS
User avatar
Kristian Marcroft
AF Moderator
 
Posts: 2962
Joined: 03. January 2003 12:08
Location: Diedorf

Postby DeathGoth » 06. October 2004 08:51

Ok, I did what ya said.. I will hahaha restart the computer.

I can get back with ya in about 24 or so hrs and let you know how it went...

Thanks again for your help there Kris..
DeathGoth
 
Posts: 7
Joined: 06. October 2004 06:02


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 10 guests