06-18-2008
Crontab email issue
Hi,
I have a script that sends a db extract file as an email attachment.
I have a crontab created to run it everyday at 8 am..
00 08 * * * ksh /home/rtaaa/tbasd/report.sh > /home/rtaaa/tbasd/logs/report.log
When i just run the "ksh /home/rtaaa/tbasd/report.sh > /home/rtaaa/tbasd/logs/report.log" from the command prompt, the email will be sent out without any issues.. but when its triggered by the crontab, the email is not getting sent.. the whole script is running well except the email part.
This is what i am doing to send the file: "sendmail $ADDR < $MAILFILE"
I have been trying to debug this without success for a while, any help is appreciated.
Thanks.
10 More Discussions You Might Find Interesting
1. Solaris
Can someone help with a cron issue on a Sun Solaris 9 machine? The problem I am having is that one of my cron jobs is sending output to the /var/mail/root and I am trying to get it to stop. I have other cron jobs that are running that do not place any output to that location. They do however send... (6 Replies)
Discussion started by: Semper_Tempus
6 Replies
2. UNIX for Dummies Questions & Answers
I have a backup script that is suppose to run every night of the week, but it never does, it starts to run. The way I can tell is that the dates on dump_log are changing to when the script runs. If I look in the cron log file is shows
! > root 506342 cr /etc/back_up Fri Aug 5 10:30:00... (2 Replies)
Discussion started by: rickyt00
2 Replies
3. Shell Programming and Scripting
Hey guys
Just need some help with crontab.Iam looking for a script that will alert particular user about its change through sendmail.We are using bash here.
--CoolKid (3 Replies)
Discussion started by: coolkid
3 Replies
4. Shell Programming and Scripting
I have a ksh script which will connect to a database and executes some sql scripts. If i run the ksh script it is working fine. But if i schedule it to run at a perticular time using cron the sql script is not running. The scriptl initially creates a spool file for sql script and then connects and... (12 Replies)
Discussion started by: Sriranga
12 Replies
5. AIX
Hi,
I have a crontab which sents email to a group in a certain interval. The email contains my user id in 'from' field of email - because my user crontab.
I don't have root access for that AIX 5.3 host - and should have to change 'from' field to either 'root' or any other common names.
... (4 Replies)
Discussion started by: vasukv
4 Replies
6. Shell Programming and Scripting
I have a oracle sh script test.sh
#!/bin/bash
R=`sqlplus -S *****/*********@dfsdf <<ENDOFSQL
set serveroutput on size unlimited;
execute DBMS_SNAPSHOT.REFRESH( '"MIS_ADMIN"."MV_SURVEY_UNITS_CENSUS"','F');
execute DBMS_SNAPSHOT.REFRESH( '"MIS_ADMIN"."MV_SURVEY_UNITS_CENSUS_PART"','F');... (1 Reply)
Discussion started by: ramkia6
1 Replies
7. UNIX for Advanced & Expert Users
We have configured a script to be run at specific time using crontab.
# crontab -l
15 11 * * * VM_Count_V4.shas per the crontab entry script should run every day 11.15 a.m
Every time when the script is executed i get a mail but when i run it using crontab it doesn't send any mail.
However... (1 Reply)
Discussion started by: pinga123
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
We are currently running AIX 6.1 TL4. There are around 30 ksh scripts that are ran from crontab which if an error occurs or a problem with an ftp unix sends the out of the ksh script which goest to our console via the local user hci which is viewed by the mail command. I've tired adding... (2 Replies)
Discussion started by: hgjdv
2 Replies
9. Shell Programming and Scripting
hi,
i have schduled a job through crontab, but it is not getting executed.
bash-3.2$ crontab -l
# Monthly Download (mm hh DD MM format)
35 05 01 04 * /home/ftpsrp/srpftp1/download/ofrdb/scripts/load_ofrdb.sh crr.sh
here is the permission of the .sh files
-rwxr--r-- 1 ftpsrp srp ... (7 Replies)
Discussion started by: lovelysethii
7 Replies
10. Shell Programming and Scripting
My shell script it.sh
#!/bin/sh
ORACLE_HOME=/var/opt/oracle/product/10g; export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin; export PATH
today=`date "+%m-%d-%Y %H:%M:%S"`; export today
CUR_DIR=$1; export CUR_DIR
LOG_FILE=$CUR_DIR/error.log; export LOG_FILE
# Direct... (30 Replies)
Discussion started by: rafa_fed2
30 Replies
LEARN ABOUT DEBIAN
lire::outputjob
OutputJob(3pm) LogReport's Lire Documentation OutputJob(3pm)
NAME
Lire::OutputJob - Object used to represent a configured formatting of a report
SYNOPSIS
use Lire::OutputJob;
use Lire::OutputFormat;
my $email = new Lire::OutputJob( 'email', $output, $output_cfg,
'emails' => [ 'email@domain.org' ] );
$email->run( 'report.xml' );
my $file = new Lire::OutputJob( 'file', $output, $output_cfg,
'filename' => '/var/www/reports/daily-%Y%m%d' );
$file->run( 'report.xml' );
DESCRIPTION
The Lire::OutputJob objects are used to represent how a report should formatted. These objects are most often created from the Lire
configuration. (The 'output_jobs' specification.)
new( $destination_type, $format, $format_cfg, ... );
Create a new Lire::OutputJob object. Two parameters are required:
$destination_type
Can be either 'email' or 'file'.
$format
A Lire::OutputFormat object.
$format
The configuration data that will be passed to the OutputFormat object.
The method will returns an instance of Lire::EmailOutputJob or Lire::FileOutputJob.
format
Returns the Lire::OutputFormat associated with this OutputJob.
format_cfg
Returns the configuration data that will be used when formatting the report.
run( $report_file )
Formats and sends or save the XML report $report_file according the OutputJob parameters.
Lire::EmailOutputJob
Extra parameters for 'email' type
emails
An array reference to the emails that will receive the formatted report.
subjet
The subject of the email.
extra_file
An additional text file that will be appended to text report or attach to other report types.
emails()
Returns as an array the emails to which the report will be sent.
subject()
Returns the subject of the email.
extra_file()
Returns the filename that will be appended to the text report or attach to the message for other report's type.
Lire::FileOutputJob
Extra parameters for 'file' type.
file
A file path with possible strftime(3pm) interpolation. This will be were the formatted report will be saved.
file()
Returns this OutputJob destination file.
output_file( [$time] )
Returns the destination file with strftime(3) specifier interpolated.
SEE ALSO
Lire::ReportJob(3pm) Lire::OutputFormat(3pm)
AUTHOR
Francis J. Lacoste <flacoste@logreport.org>
VERSION
$Id: OutputJob.pm,v 1.8 2006/07/23 13:16:29 vanbaal Exp $
COPYRIGHT
Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
Lire 2.1.1 2006-07-23 OutputJob(3pm)