1833784 Members
4207 Online
110063 Solutions
New Discussion

Re: At command

 
Wendy Stein
Occasional Contributor

At command

I am running this command:

$ at -f script.sh now

script.sh contains:

$mailx -s "Job Completed" $username<$filename

If $filename contains more than 378 characters in it, then the user will receive an e-mail with NO the subject line AND another e-mail goes to the user who ran the script with the following message :

/var/tmp/mailxCAA.....: file too large
**************************************
Cron: The previous message is the standard output and standard error of one of your at commands.

If I run this script without using 'at', it is fine. If the file sent is 377 or less characters, it is also fine. Once I go over 378 characters, I consistently get the error.

Is there some limitation when using the at command and sending an e-mail ?????
9 REPLIES 9
Massimo Bianchi
Honored Contributor

Re: At command

Hi,
did you try the following ?

cat $filename | mailx -s "Job Completed" $username

I know that's quite the same, but the redirection is used in another way, and i used this always with no problem.

Massimo
Wendy Stein
Occasional Contributor

Re: At command

Yes I have and this gives me the same results.
Declan Heerey
Frequent Advisor

Re: At command

I have just run the same script against a file with 11776 lines and 2109500 characters and it worked fine. What version of sendmail are you using? are all patches applied to your version of Unix?
Pete Randall
Outstanding Contributor

Re: At command

Wendy,

I don't have any insights for you, but, reading the responses so far, I'm sensing some confusion about what the actual question is.

Are you saying that the actual name of the file contains over 378 characters (I pity the poor person who has to type that out) or the contents of the file exceed 378 characters?


Pete


Pete
Mark Grant
Honored Contributor

Re: At command

Is it possible that you are filling up /var/tmp ?
Never preceed any demonstration with anything more predictive than "watch this"
Wendy Stein
Occasional Contributor

Re: At command

Ok... I am not filling /var/tmp up,
The filename is 5 characters, but the contents are > 378 characters and
I am running version 8.8.6 of sendmail .....
Wendy Stein
Occasional Contributor

Re: At command

I have solved my own problem. Thanks to all that gave suggestions. The problem was the /var/adm/cron/.proto file with the ulimit.
I changed the ulimit value and now it is fine.
Declan Heerey
Frequent Advisor

Re: At command

Wendy, what did you change the ulimit parameter to be? how did you find out about the .proto file?

Declan
Wendy Stein
Occasional Contributor

Re: At command

I found a resolution using the search in hp technical knowledge base and got to this

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065678246

I put this code in but still had a problem so I just hardcoded the ulimit in the .proto file to 4194303.