Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 630

Reportsmail not sending report when using cron.

$
0
0

Hi,

 

I've encounted an issue where I have a bash script that I can run on the command line and this will generate the report and email it to a distro list I have setup.  On the other hand if I run it via cron, logs say it runs but never sends the email. 

 

Here's the script:

[zenoss@localhost ~]$ cat emailAvailabilityReport.sh

#!/bin/sh

ZENOSS_ENV=~zenoss/.bashrc

REPORTS_URL="http://xxx.xxx.xxx.xxx:8080/zport/dmd/reports#reporttree:.zport.dmd.Reports.Performance Reports.Availability Report"

 

 

$ZENHOME/bin/reportmail \

--user=admin \

--passwd=XXXXXXX \

--from="alerts@XXXXXX.com" \

--address="alerts@XXXXX.com" \

--subject="Zenoss: Availability Report" \

--url="$REPORTS_URL/Performance Reports/Availability Report"

 

 

Here's the cron job I have setup (for output):

[zenoss@localhost ~]$ crontab -l

* 17 * * * /home/zenoss/emailAvailabilityReport.sh >> /home/zenoss/zenossreport.log

 

 

Cron shows at it actually being called in the logs:

Jun 25 17:59:01 localhost crond[31739]: (zenoss) CMD (/home/zenoss/emailAvailabilityReport.sh >> /home/zenoss/zenossreport.log)

 

 

Checked to make sure I have the right path to run it:

[zenoss@localhost ~]$ ls -la /home/zenoss/emailAvailabilityReport.sh

-rwxrwxr-x 1 zenoss zenoss 399 Jun 25 17:08 /home/zenoss/emailAvailabilityReport.sh

 

This is rather maddening so any help would be appreciated.


Viewing all articles
Browse latest Browse all 630

Trending Articles