Mail not attaching the attachment when schedule in crontab


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail not attaching the attachment when schedule in crontab
# 1  
Old 04-18-2012
Mail not attaching the attachment when schedule in crontab

Hi ,

Iam want to send the mail with attachment , iam using below in my script
Code:
uuencode /path/pathname/filename  filename.csv | mailx -s "subject of mail" vinoth@xxx.com

when i trigger the script manually from command prompt i can get with the attachment but when i schedule it in crontab iam getting the the mail without attachment, not sure why it is behaving in two different ways for manual running and cronjob running.

Please advice me.Smilie

Last edited by Franklin52; 04-20-2012 at 03:14 AM.. Reason: Please use code tags
# 2  
Old 04-18-2012
What platform are you trying this on...
# 3  
Old 04-18-2012
The error message (if any) should be in unix mail for the owner of the crontab.

If the attachment file is created within the script, make sure that it is created with the full path or it will end up in the home directory of the owner of the crontab.
# 4  
Old 04-19-2012
Hi shamrock ,

Iam working on Linux platform.What will be the issue?

---------- Post updated at 08:50 AM ---------- Previous update was at 08:49 AM ----------

Methyl ,

Iam sure that i have created csv file with full path ,every where i have mentioned full path.Please tell me how to check the cronjob log where the errors will be written for cronjobs.
# 5  
Old 04-19-2012
Sorry I don't know where your cron on your Linux system logs its errors. Try man cron on your system. On some it will be in /var/log .

Have you looked in unix mail for the owner of the crontab (or root mail if it is a root cron).

Please post the crontab line.

Ps. Just calling your O/S Linux is like reporting a detailed fault engine with your Ford.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to schedule crontab?

Hi All, How to schedule crontab on all day except sunday and monday means from tuesday to saturday at 06:00AM. (3 Replies)
Discussion started by: Riverstone
3 Replies

2. Shell Programming and Scripting

Crontab schedule

Hi all, I would like to schedule a crontab script, which should run From 8pm Thursday to 2am Friday and it should run every 10 minutes. I have put a script like below, is it the correct one. 10 01,02,20,21,22,23,00 * * 4-5 /u01/app/test.ksh Any other options available to schedule the same... (6 Replies)
Discussion started by: sid2013
6 Replies

3. UNIX for Advanced & Expert Users

Schedule a Crontab

All, I'm a newbie with crontab and I need your help with schedule a cold-backup running every Sunday at 7am except 1st of the month. Thank you so much. (2 Replies)
Discussion started by: hanie123
2 Replies

4. Shell Programming and Scripting

Crontab schedule

Hi, I have a script which will query the DB and added to crontab at 1,2,6,7 AM everyday and sends a email if count is 0. Now the problem is, if crontab is disabled it doesn't sends a mail. Please tell me how can I handle this situation in the script. (2 Replies)
Discussion started by: sandy1028
2 Replies

5. Shell Programming and Scripting

Unix Crontab schedule

Hi, I want schedule a script with fowllowing days. The crontab and schedule to run every 2 hours from Monday to Saturday at noon. (1 Reply)
Discussion started by: koti_rama
1 Replies

6. Shell Programming and Scripting

attaching file in mail command from shell script

Hi all, Currently in shell script i am using the following command to send mail echo "Certain assets are not loaded properly. PFA the result of the DataLoad" | mail -s "Weekly DataLoad - Failure Notification !!" $MAILINGLIST I need to attach a file along with that. How should i handle this... (7 Replies)
Discussion started by: ananthi_ku
7 Replies

7. Shell Programming and Scripting

Problem in attaching CVS file to the mail

i wrote this code(( cat $REPORT_EMAIL;uuencode <$OUTFILE $OUTFILE ) | mailx -s "Auto Policy Attach Report Before batch job " $SUPPORT_EMAIL_GRP) in my shell script to attach afile but in the mail i donot get a attachment contais of the mail is Auto Policy Attach Report Before batch job... (0 Replies)
Discussion started by: alokjyotibal
0 Replies

8. UNIX for Dummies Questions & Answers

Crontab schedule

I have the following crontab entry. 0,30 00-16 * * * This job runs every 30 minutes between the hours of 12:00AM and 4:00PM. How can I have it stop at 4:30PM instead? Thank you, David (3 Replies)
Discussion started by: dkranes
3 Replies

9. Shell Programming and Scripting

attaching the file to mail

Hi, In my script, i am using tar to combine 2 files, so that i can attach it to the mail. everything is working fine and sending the mail successfully. But, when i save the file to desktop and unzip it. a series of directories are there and finally those tar files are there. i am using tar -cf... (1 Reply)
Discussion started by: javeed7
1 Replies

10. HP-UX

Attaching files in Mail with HP Unix

I am trying to attach a .xls file using uuencode in HP Unix uuencode res1.xls res1.xls | mailx abc@xyz.com But in the receiving end, I couldn't see the attachement, instead of it some encoded text is there in the body of mail Can anybody suggest how to attach the files in HP Unix. I don't... (12 Replies)
Discussion started by: unipepper
12 Replies
Login or Register to Ask a Question