How to change crontab output from console to email?
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 the MAILTO=Test@email.com varaible to the crontab doing a crontab -e as well as adding the variable MAIL=Test@email.com but neither options seemed to work.
I was able piple a mail command to the end of the cron entry however it only displays my subject. It does the job of notifying of an issue but doesn't contain the actual output shown below when looking at the message via mail commad. That option would work but I want any of these jobs to email us and having to piple a mail for each just doesn't seem efficient.
I'm not for sure if our version of AIX doesn't support the mailto varible or if I'm doing something incorrectly. I'm searched this and googled this topic and have tried those variables as well as setting up an aliase which didn't seem to work as well.
I see in the LOGNAME variabile in the output below has hci but I'm not for sure if that is what is being used as the TO: setting for the emial or if there is a config file somewhere that I can update to set the desired email address. Any help would be appreciated.
Example of crontab entry used for piping email would prefer to just have all the crontab jobs for the user hci send an email out instead of having to pipe a mail to each entry. Also I'm not wanting thsi email address to reiceve emails from the root crontab on the hic usr.
Moderator's Comments:
Please use code tags next time for your code and data.
Last edited by vbe; 01-17-2013 at 01:46 PM..
Reason: code tags...
Hello.
I am trying to figure out how to change the title of my console window. I don't need it to dynamically change with my current directory. I just want to be able to change the name of it, so when I minimize the window I can see which windows are for what purpose.
I've tried using the... (8 Replies)
I run my nightly backup thru a crontab job. Is there any way to get the message to mount a new tape to the console? Currently it appears to go to an email. (1 Reply)
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)
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 >... (5 Replies)
Hi folks,
Please advise which command/command line shall I run;
1) to display the command and its output on console
2) simultaneous to save the command and its output on a file
I tried tee command as follows;
$ ps aux | grep mysql | tee /path/to/output.txt
It displayed the... (7 Replies)
The console's window size in VMware is too small. How can I change it?
I mean changing the window size of pseudo terminals such as tty1, not the kde desktop.
I think it may be connected to resolution.But changing resolution in the menu.lst of grub doesn't work.
Any ideas?
Thanks. (4 Replies)
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)
Hey everyone
I have a sparc enterprise T2000 I'm trying to install solaris 10 on. The only way I can connect to it is the SER MGT console, but I'm not getting anything to display (in Hyper terminal, or PUTTY) when I boot it. Upon googleing, all I get back is "No output may have been generated.... (4 Replies)
Hi All,
Whenever I login to server via console, after providing username (root) it displays a banner message. I want to remove this message
Serverabc : root
Welcome to Server !!!
Password:
It is Centos 5.4 box.
I have checked /etc/issue and /etc/motd. It does not... (8 Replies)
I have tried below email method and i am getting every thing in single line . i have put echo to provide space, but it is not helping
my code
(
echo "From: $FROM"
echo "To: $MAILTO"
echo "CC: $CC"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo 'Content-Type: multipart/mixed;... (6 Replies)