Sponsored Content
Full Discussion: Awstats stderr solution
Operating Systems BSD Awstats stderr solution Post 302227384 by otheus on Thursday 21st of August 2008 05:58:06 AM
Old 08-21-2008
So is there a program or script named "awstats" which is in a crontab? Let's say you have this job running every day at 2:30 am.

Code:
2  30  * * * /usr/local/bin/awstats

If you want it to only email you when there's a problem, just do this:
Code:
2  30  * * * /usr/local/bin/awstats >/dev/null 2>&1 || echo "awstats failed to complete"

This does require that the script exit with a non-zero condition upon an error. Do you have a way of testing this?
 

3 More Discussions You Might Find Interesting

1. BSD

can't install AWStats

I am running FreeBSD 6.3 and trying to install AWStats. I found this site with some instructions: Installing AWStats on FreeBSD however, the pkg install doesn't work. This is the error I get: dl1-3# pkg_add install -r awstats pkg_add: can't stat package file 'install' pkg_add: can't stat... (3 Replies)
Discussion started by: jasonfrost
3 Replies

2. Web Development

AWstats - Installation

Hi Gurus, I was trying to install AWstats in one of my EL5 boxes and got the below error: # rpm -i awstats-7.0-1.noarch.rpm error: Failed dependencies: perl(LWP::UserAgent) is needed by awstats-7.0-1.noarch # rpm -i perl-Test-Mock-LWP-0.05-1.el6.rf.noarch.rpm warning:... (1 Reply)
Discussion started by: Hari_Ganesh
1 Replies

3. Infrastructure Monitoring

Awstats webserver analyser

Need assistance in troubleshooting I have configured awstats 7.3 version on RedHat linux and I am stuck at getting the updates from the website . Please let me know if anybody can give me some inputs I can see the webpages but it gives "Never updated (See 'Build/Update' on awstats_setup.html... (2 Replies)
Discussion started by: ajayram_arya
2 Replies
CRONTABS(4)						      Crontabs users' Manual						       CRONTABS(4)

NAME
crontabs - configuration and scripts for running periodical jobs SYNOPSIS
run-parts [--list|--test]<directory> DESCRIPTION
Crontabs is a historical name for the run-parts script and the system crontab. The run-parts script runs all executables in the specified directory. Run-parts runs all executables in the specified directory. The execution of files can be allowed or denied by creating file jobs.allow or jobs.deny which worked similar as other allow/deny config files. The file must be created in the specified directory. --list print names of all files (not limited to executables), but don't run them. This option can't be used with test option. --test print names of files, which would be run. Randomization of jobs can be configured in the /etc/sysconfig/run-parts file. To enable randomization of jobs, set the RANDOMIZE parameter to 1 and set the RANDOM parameter to an integer which determines a random seed. Additionally, you may configure the RAN- DOMTIME parameter (again, by specifying an integer) to provide an additional level of randomization. Jobs are not randomized when the RANDOM and RANDOMTIME parameters are set to 0. Values in these two parameters must be set to 1 or larger to provide a good enough randomization. Randomization of cron jobs can be useful for shared networks, where multiple cron jobs executed at once can cause spikes in traffic, especially during daily jobs. With randomized jobs, the workload is evenly distributed throughout the day. EXAMPLE OF CONFIGURATION FILE
RANDOMIZE=1 RANDOM=4 RANDOMTIME=8 Historically the crontab file contained configuration which called run-parts on files in cron.{daily,weekly,monthly} directories. These jobs are now run indirectly through anacron to prevent conflicts between cron and anacron. That means the anacron package has to be installed if the jobs in these directories should be running. Refer to the anacron(8) how to limit the time of day of the job execution. EXAMPLE
/etc/cron.daily/jobs.deny could contain for example 0logwatch which forbid execution of this script. SEE ALSO
anacron(8), crontab(5) Marcela Malaova 2012-08-29 CRONTABS(4)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy