09-21-2008
Quote:
Originally Posted by
unSpawn
If $FILEPATH is not known in cron env you could make it use a default with "${FILEPATH:=/some/dir}/ttw.html".
The issue is
not with filepath. Since in the previous line I am doing a head on the file, and the file is read fine. (Earlier I hardcoded the filepath)
Cron
is finding mpack, and it
is finding the file.
I even did things like putting the email id in quotes just incase /bin/sh is griping on the @. However, if that were the case, then it would not work when I put in my own python email script. The same cron is able to send the file through my script. (However, the way mpack encodes is different from the way my python script does, so i want to use mpack).
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
When I give the following
$ ps -ef | grep `echo $var1` | grep -v "grep `echo $var1`" | awk '{print $3}' | grep -v `echo $var1
80892
But when I give the following (made as command substitution) , I get error
$var2=`ps -ef | grep `echo $var1` |... (2 Replies)
Discussion started by: preetikate
2 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
i executed a script.
cat <filename> | grep <pattern> | awk '{print $1}' | read a
i get the answer when i execute it in the shell env (no problem with that)
as
./<name>.ksh
when i tried the same in cron (as an entry in cron)
value is not being read in the variable a through... (1 Reply)
Discussion started by: matrixmadhan
1 Replies
3. Shell Programming and Scripting
Part of my script throws an error.
Your "cron" job on mitv-t-voms02
/usr/tlrscr/runhc.sh
produced the following output:
/usr/tlrscr/runhc.sh: top: not found
/usr/tlrscr/runhc.sh: top: not found
/usr/tlrscr/runhc.sh: top: not found
syntax error on line 1, teletype
That part of... (2 Replies)
Discussion started by: sundar63
2 Replies
4. Shell Programming and Scripting
Hi,
I was using mpack to send mails using cronjob with attachments. It was working perfect. But recently it's behaving strangely. Its sending the mails without any error message but the mail is not getting delivered.
The code I was using:
/usr/local/bin/mpack -s "$SUBJECT" -d $MSGBODY... (0 Replies)
Discussion started by: itesh.dash
0 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I was using mpack for sending mails with pdf as attachment. It was working well. but some days back my server was shut down forcefully due to power failure and I found now the mails are moving to the queue always.
I checked in /var/spool/mail/mqueue. Is the forece shutdown has to do... (0 Replies)
Discussion started by: itesh.dash
0 Replies
6. Shell Programming and Scripting
Hi,
I have script which is properly running but when i schedule it in cron it throws an error like :
Your "cron" job on retrprdapp1
/usr/bin/sh /retr/cron/ftp.sh 2>&1
produced the following output:
/retr/cron/ftp.sh: syntax error at line 17: `(' unexpected
line17 is
# Get list of... (10 Replies)
Discussion started by: rajagasti
10 Replies
7. Shell Programming and Scripting
Hello,
I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error:
stty: tcgetattr: a specified file does not support the... (3 Replies)
Discussion started by: fabiogilr
3 Replies
8. UNIX for Dummies Questions & Answers
hi everyone I'm newbie in this forum hope I can get some help here :)
I have a command in crontab that executed every 1 minute
sometime this command need more than 1 minute to finish
the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies
9. Shell Programming and Scripting
Hi All ,
Please read the below data carefully.
I have run the below script on unix server its running succesfully. but when i run the same script using cronsetyp it giving me the error :
command not found at (line num):cruiseStartup.sh
below is code
netstat -anp |grep 8181... (5 Replies)
Discussion started by: aish11
5 Replies
10. UNIX for Dummies Questions & Answers
I am receiving an error when i type the command dmesg
sudo: sysmon : pam_authenticate: Conversation failure ; TTY=unknown ; PWD=/export/home/sysmon ; USER=root ; COMMAND=/opt/scripts/cronmgmt/synch_crontab.ksh
Whats it about and how can I remove it ? (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
LEARN ABOUT DEBIAN
script-email
SCRIPT-EMAIL(8) System Administration Commands SCRIPT-EMAIL(8)
NAME
script-email - Amanda script to send email notifications
DESCRIPTION
script-email is an Amanda script implementing the Script API. It should not be run by users directly. It sends a notification email to the
addresses specified in the MAILTO property.
PROPERTIES
This section lists the properties that control script-email's functionality. See amanda-scripts(7) for information on the Script API,
script configuration.
MAILTO
List of email addresses that will receive an email on command execution. It is a multi-valued property:
property "MAILTO" "amanda@domain.com" "sysadmin@domain.com" "amandauser@domain.com"
EXAMPLE
In this example, script-email is scheduled to be run before the DLE, on the server. The unqualified email address amanda will be passed to
the email system unchanged. The script is then attached to a dumptype, which can then be specified for any DLEs which require
notification.
define script-tool pre-email {
comment "email me before this DLE is backed up"
plugin "script-email"
execute-on pre-dle-backup
execute-where server
property "mailto" "amanda"
}
define dumptype user-tar-email {
user-tar
script "pre-email"
}
SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.1 02/21/2012 SCRIPT-EMAIL(8)