Results 1 to 2 of 2
Using CentOS. I have a cron setup to run this command:
Code:
/var/test.sh | mail -s "Test Cron" mr182@somewhere.com
The email is sent but the output of the script is ...
- 05-28-2010 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 33
[SOLVED] Email output of Cron command, sends email but no content?
Using CentOS. I have a cron setup to run this command:
The email is sent but the output of the script is not in the email body, it's just blank. I know there is some output because there are some echo statements in the script.Code:/var/test.sh | mail -s "Test Cron" mr182@somewhere.com
I don't want to get an email for all cronjobs, just this one.
Any ideas?
Thanks
- 05-28-2010 #2Just Joined!
- Join Date
- Jun 2008
- Posts
- 33
Got it working using this:
Code:/var/test.sh 2>&1 | mail -v -s "Cron: test" mr182@somewhere.com


