LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2016, 03:58 AM   #1
surya24d
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Rep: Reputation: Disabled
Email Attachment not working with crontab


I am using below command to send email with attachment
(uuencode /export/home/nis/ip$DATE.csv /export/home/nis/ip$DATE.csv) | mailx -s " IP UTILIZATION" email ids

bash -xv /export/home/nis/ip.sh

It's working fine if i am executing thru command line but with cronjob it's not working. I mean it's sending email but without attachment.

Last edited by surya24d; 02-11-2016 at 04:00 AM.
 
Old 02-11-2016, 07:42 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,104

Rep: Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310Reputation: 1310
Put /the/full/path/to/uuencode in your script.
 
Old 02-11-2016, 01:35 PM   #3
jnojr
Member
 
Registered: Sep 2007
Location: San Diego, CA
Posts: 223

Rep: Reputation: 20
Quote:
Originally Posted by TenTenths View Post
Put /the/full/path/to/uuencode in your script.
This, cron does not import your path, cron jobs have their own.

You could also set PATH=<whatever> in your crontab.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Email Attachment not working with crontab rruchika Linux - Server 4 03-26-2012 06:18 AM
help- how to reduce Size of Email attachment send via Crontab pnandak Linux - Newbie 18 02-29-2012 06:12 PM
problem in adding attachment in crontab kalpesh chhajed Linux - Newbie 3 11-25-2011 04:51 AM
convert email files with attachment to save as attachment file (metamail?) ted_chou12 Linux - Software 2 04-08-2011 08:01 PM
email attachment lhrt Linux - Networking 3 05-31-2006 05:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration