Quantcast
Channel: General Help - FreePBX Community Forums
Viewing all articles
Browse latest Browse all 12666

Empty email from cron job

$
0
0

@RevDarkman wrote:

Hi All

I had this script running just fine on my old FreePBX server - however there is something odd happening running this from cron. I need to check that the correct handover of the queue has completed correctly, as I have users with fat fingers logging into the queue!

When running this manually, the email is sent with the contents of queue.txt.

When running from cron, the email is sent but is empty. Any ideas because I am stumped!

# script to email status of On Call Queue every hour
# at quarter past the hour
#!/bin/bash
cd /etc/
NOW=$(date +"%m-%d-%y %H-%M")
asterisk -rx "queue show 700" > /etc/queue.txt
mail -r "freepbx@XXXXXXX.co.uk (XXXXXXXX FreePBX)" -s "On Call Queue Status $NOW" ifan@XXXXXXX.co.uk < /etc/queue.txt
rm /etc/queue.txt

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 12666

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>