LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 01-14-2005, 08:28 AM   #1
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Rep: Reputation: 15
CRON Process Won't Execute Automatically


Hi everyone,

I've got a process setup in my /etc/cron.hourly folder to parse my log files to generate stats for webalizer. The file has 755 permissions, and inside the file reads this:

#!/bin/bash
webalizer -c /etc/webalizer.conf

For some reason CRON won't process this automatically. My stats aren't updated hourly. I don't see any errors generating either in my /var/log/cron file. Although, i can execute the script by just typing ./webalizer in the /etc/cron.hourly folder and everything works fine.

I changed the /etc/webalizer.conf file to 755 permissions to see if that might effect things, but it hasn't. I know this has to be something simple..



TIA
 
Old 01-14-2005, 08:29 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
Is crond even running? Did you set this up for root's crontab or another users? And if so, is the webalizer command in that users path?
 
Old 01-14-2005, 08:33 AM   #3
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Original Poster
Rep: Reputation: 15
Quick response..

Crond is running - i have a bunch of other processes that cron executes without problems. Forgive my ignorance, but how do i check if the webalizer command is in roots path? If i just execute webalizer manually from the root login it works fine by using 'webalizer -c /etc/webalizer.conf'.
 
Old 01-14-2005, 11:58 AM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
Make sure to use the full path to the script in cron.
 
Old 01-14-2005, 12:26 PM   #5
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 62
Maybe you need to put the complete path to webalizer

#!/bin/bash
/usr/wherever/it/is/webalizer -c /etc/webalizer.conf

Any errors in your email from cron?
 
Old 01-14-2005, 03:51 PM   #6
Transition
Member
 
Registered: Aug 2003
Distribution: Slackware 10
Posts: 48

Original Poster
Rep: Reputation: 15
Aha!~ It was the complete path to webalizer that fixed it. :-) Thank you very much for your help.
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
Execute an application automatically after startx gilan Debian 6 03-24-2005 10:34 PM
i need to write a program it has to execute automatically ykirankumar Linux - Software 5 08-31-2004 12:34 AM
execute php script automatically? brandnewbie Linux - Newbie 1 08-14-2004 05:42 AM
problem with binding process and than execute another process chapa Programming 0 08-27-2003 03:47 AM


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