Sponsored Content
Full Discussion: email when cron fails
Top Forums UNIX for Dummies Questions & Answers email when cron fails Post 17440 by inpavan on Friday 15th of March 2002 04:24:53 AM
Old 03-15-2002
Question email when cron fails

I have a cronjob scheduled to run everyday. How can I obtain an email if and only if the cronjob fails?

I am using Sun Solaris (ksh).

Smilie
 

10 More Discussions You Might Find Interesting

1. Solaris

Created cron.allow file and now email fails

Getting ready for Sarbanes Oxley and I was told that I need to create a cron.allow file for the box so that only specified users can create cron jobs. That was easy enough, and I put in all the accounts that had scheduled cron jobs such as: root lp My oracle account A couple of programmer... (1 Reply)
Discussion started by: citrowske
1 Replies

2. UNIX for Dummies Questions & Answers

Cron Email Problem

I have two different cron jobs that run on the same days. The jobs are 7 hours apart. Both jobs are set to send notification emails when they start running. Both jobs always run successfully, but I only receive an email from the first job. I never get the email from the second job. ... (0 Replies)
Discussion started by: sasaliasim
0 Replies

3. Shell Programming and Scripting

Running script that sends an html formatted email fails when its run as cronjob

Hi Im very new at working with unix and this problem I simply can not understand. I know there are a lot of threads about problems with shell scripts behaving differently when run from a terminal and from a cronjob. I have tried everything(almost) but I still havent cracked this problem. Im... (15 Replies)
Discussion started by: Nightowl
15 Replies

4. Shell Programming and Scripting

Cron job fails, but works fine from command line

I have a very basic script that essentially sends a log file, via FTP, to a backup server. My cron entry to run this every night is: 55 23 * * * /usr/bin/archive_logs The script runs perfectly when executed manually, and actually worked via cron for about three weeks. However, it mysteriously... (3 Replies)
Discussion started by: cdunavent
3 Replies

5. Shell Programming and Scripting

cron entry fails.

Hello, I have added the following entry in my cron file: * * * * * . /home/texprd/.profile>/dev/null 2>&1; echo "test" >> /home/texprd/test.log 2>&1 The cron fails ie the added command fails to append "test" in the test.log file. However if I run the command manually from the shell... (3 Replies)
Discussion started by: mahive
3 Replies

6. UNIX for Dummies Questions & Answers

If FTP cron job fails to connect = quit

Im having a problem with my ftp CRON jobs. I have another related (but not the same question in shell scripting). My FTP CRON jobs connect to a server and drop some files off, if for some reason it cannot connect to the server (timesout/password wrong etc) instead of stopping, it tries again... (3 Replies)
Discussion started by: mokachoka
3 Replies

7. UNIX for Advanced & Expert Users

Cron job fails every now and then.

I added a shell script to cron that executes every 5-15 minutes. It's used to monitor multiple environments, so it has to ssh to each machine to check the status of that machine. Sometimes, I may have more than one instance of this script running at the same time. So, here's my problem. I've... (2 Replies)
Discussion started by: mrwatkin
2 Replies

8. Red Hat

Email program using CRON

Hi Guys... I have a bulk email program that sends out an email to a subscribed mail list. The list contains around 2000 addresses. My server is Centos 5 64bit PHP 5.2 Mysql 5.1 The program is set to send emails in batches of 100. Cron is set to run every minute Now for the problem:... (2 Replies)
Discussion started by: countrydj
2 Replies

9. Shell Programming and Scripting

Cron job fails with [DataDirect][ODBC lib] Connection not open error

Hi, When run the script directly...it executes as expected. But when put it in crontab the job fails with this error: Connection not open 08003: Connection not open Unable to connect to the database... how come it is not able to connect when cron job fires?... Do I need to... (7 Replies)
Discussion started by: nuthakki
7 Replies

10. Shell Programming and Scripting

Script fails to send out email when HOSTNAME is included

Hi, Below is my script which sends out emails. more test.sh 1 #!/bin/ksh 2 { 3 print "From: Prod@mycomp.com" 4 # print "From: Prod@`hostname`.com" 5 # print "From: Prod@${HOSTNAME}.com" 6 print "To: me@mycomp.com" 7 print "Subject:... (5 Replies)
Discussion started by: mohtashims
5 Replies
METCHE(8)						      System Manager's Manual							 METCHE(8)

NAME
metche - reducing root bus factor SYNOPSIS
metche [-h VSERVER] report (stable|testing|unstable)-YYYYMMDDHHMM metche [-h VSERVER] list metche [-h VSERVER] stabilize testing-YYYYMMDDHHMM DESCRIPTION
metche is a tool meant to ease collective system administration by monitoring changes in the system configuration. metche basic usage is to monitor changes in a directory, usually /etc; optionally, metche can also monitor: o one or more user maintained changelog files, o the state of Debian packages and versions. metche should be installed with a cronjob that regularly runs to automatically save the system state as needed. These states are saved in a way similar to the Debian development model: o unstable states are saved as soon as a change is detected. They are kept until a new testing state appears. o testing states is created from the last unstable state that has not been changed after a short amount of time (by default, one hour). Old unstable states are deleted afterwards. o stable states are created from the last testing state, either manually, or after a long amount of time (by default, 3 days). Old testing states are deleted afterwards. When a new testing state is saved, an email is sent to a configurable address, giving an overwiew of the differences with the previous testing. A notification is also sent when a new stable state is saved. metche's configuration is read from /etc/metche.conf. Various settings like changelog monitoring or time between system state switches are described there. OPTIONS
If -h VSERVER is specified, the VServer VSERVER is operated on instead of the host system. This, along with the VSNAMES option, allows one to monitor several VServers running on the system. One of the following commands must be specified on the command line: report When run with the report command, metche displays a report against the specified saved state, or if unspecified, against the latest testing state. This is useful when you have broken your system and want to know which changes have been made since a given, known working, system state. list When run with the list command, metche displays a list of all the saved states. stabilize When run with the stabilize command, metche turns a "testing state" into a "stable state". By default, it will use the last "test- ing state", but this can be overridden by giving a specific state as argument. cron This command should not be called manually, but used from a cronjob. When called, it can perform various operations like: saving "unstable", "testing" or "stable" states as needed and sending reports and notification if configured to do so. This command does not support the -h option. FILES
/etc/metche.conf contains metche configuration. When configured to monitor one changelog, CHANGELOG_FILE (default: /root/Changelog). When configured to monitor multiple changelogs, CHANGELOG_DIR/*/Changelog (default: /root/changelogs). System states are saved in BACKUP_DIR (default: /var/lib/metche). SECURITY
metche is able to use GnuPG to encrypt the email it sends, but does not by default; just enable the ENCRYPT_EMAIL configuration option, and make sure EMAIL_ADDRESS' public key is in root's keyring, trusted enough to be used blindly by metche. If EMAIL_ADDRESS is an email alias or mailing-list's address, you probably want to use the group option in /root/.gnupg/gpg.conf so that metche reports are encrypted for every person subscribed to this alias or mailing-list; for more information, see gpg(1). When DO_DETAILS is enabled and ENCRYPT_EMAIL is disabled, metche sends in clear text email the changes made to the watched directory... either make sure that the EXCLUDES configuration variable prevents it to send sensitive information, or triple check that secure connec- tions will be used end-to-end on the email path. If unsure, set EMAIL_ADDRESS configuration variable to a local mailbox. Please note that EMAIL_ADDRESS is not used for VServers: a VServer's report messages are sent to its root email address. metche stores, in BACKUP_DIR (default: /var/lib/metche), various backups of WATCHED_DIR. Make sure that this backup place is at least as secured as the source. BUGS
See metche's ticket system (https://labs.riseup.net/code/projects/metche/issues) for known bugs, missing features, and the development road-map. AUTHORS
metche and this manual page were written by the boum.org collective, and are now maintained by the metche developers collective <metche@lists.riseup.net>. metche user manual June 5, 2011 METCHE(8)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy