Strange error on mpack from cronjob


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Strange error on mpack from cronjob
Prev   Next
# 1  
Old 09-20-2008
Strange error on mpack from cronjob

I have a shell script which mails a file. It runs fine when executed at prompt, but from cronjob the following line gives an error:

HTML Code:
$ /opt/local/bin/mpack -s "TTW posts " $FILEPATH/ttw.html myemail@gmail.com


Error is : (some junk chars) followed by No such file or directory.

Before this line ,I have `head`ed the file to ensure it is found by cron - IT IS. I have also `which`ed mpack and it (cron) gives the full path. So I am stumped as to why it should fail from cron. Both file and executable are found!

Strangely, after this I also 'links -dump' the file and use mail to mail it to my localhost. Links is also in /opt/local and this line works fine. However, since the stock 'mail' program cannot send an attach, therefore I needed to use mpack.

Doing 'ls -l' on mpack shows it is readable and executable by all -- same as other commands in /opt.

Last edited by sentinel; 09-21-2008 at 04:59 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Strange Error

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

2. Shell Programming and Scripting

Error at the time of cronjob run

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

3. UNIX for Dummies Questions & Answers

how to cancel a cronjob if the cronjob still running

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

4. Shell Programming and Scripting

stty error when script is called out of a cronjob

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

5. Shell Programming and Scripting

A running Script giving error while scheduled in cronjob

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

6. UNIX for Dummies Questions & Answers

cant send mails with mpack/uuencode AIX 5.3

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

7. Shell Programming and Scripting

mpack behaves abnormally

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

8. Shell Programming and Scripting

cronjob: Partial script error

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

9. UNIX for Dummies Questions & Answers

Strange error

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

10. Shell Programming and Scripting

Strange error.. help

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
Login or Register to Ask a Question