<div dir="ltr"><font face="times new roman, serif">Hello Duane, I would try this in crontab -e<br></font><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">* * * * * /etc/asterisk/scripts/<wbr>announcements01.sh</font></div><div><font face="times new roman, serif"><br></font></div><div><font face="times new roman, serif">David</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 27, 2017 at 6:43 AM, DuaneVT . <span dir="ltr"><<a href="mailto:selkie2@comcast.net" target="_blank">selkie2@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">I finally got to the root mail to see what errors crontab was finding with running this script. I have crontab calling ann01.sh script and the script is running. </font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">The ann01.sh and prompt01.gsm files are in /etc/asterisk/scripts. Both files and the scripts folder are set as executable.</font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">The ann01.sh script is as below:</font></div><div class="gmail_default" style="font-size:small"><span class=""><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif">#!/bin/bash</font></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif"># Script plays prompt01 audio files over local node (repeater)</font></div></span><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif"># Runs "localplay prompt01.gsm via IAX or radio *970</span><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif">PATH=/usr/local/sbin:/usr/loca<wbr>l/bin:/usr/sbin:/usr/bin:/sbin<wbr>:/bin:/usr/sbin/asterisk/</font></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif">/usr/sbin/asterisk -rx "rpt localplay /etc/asterisk/scripts/prompt01<wbr>" # error "can't open ann01"</font></div><div class="gmail_default" style="font-size:15px"><br></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif">sudo asterisk -rx "rpt fun 42996 *970" </font><span style="font-family:arial,helvetica,sans-serif"># error "can't open ann01"</span></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif">asterisk -rx "rpt fun 42996 *970" </font><span style="font-family:arial,helvetica,sans-serif"># error "can't open ann01"</span><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-size:15px"><font face="arial, helvetica, sans-serif">/usr/sbin/asterisk -rx "rpt fun 42996 *970" </font><span style="font-family:arial,helvetica,sans-serif"># error "can't open ann01"</span><br></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">echo "Hello World" >> test # runs fine!</span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">------------------------------<wbr>---------------</span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">I can hit *970 on the radio and hear the localplay run the prompt01 speech.</span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">I can type ann01 via ssh and the prompt01 is heard.</span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">I just can't get the ann01.sh script to run from cron!</span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">Help!</span></div><div class="gmail_default" style="font-size:15px"><span style="font-family:arial,helvetica,sans-serif">Duane KA1LM</span></div></div></div>
<br>______________________________<wbr>_________________<br>
App_rpt-users mailing list<br>
<a href="mailto:App_rpt-users@lists.allstarlink.org">App_rpt-users@lists.<wbr>allstarlink.org</a><br>
<a href="http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users" rel="noreferrer" target="_blank">http://lists.allstarlink.org/<wbr>cgi-bin/mailman/listinfo/app_<wbr>rpt-users</a><br>
<br>
To unsubscribe from this list please visit <a href="http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users" rel="noreferrer" target="_blank">http://lists.allstarlink.org/<wbr>cgi-bin/mailman/listinfo/app_<wbr>rpt-users</a> and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button"<br>
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. <br></blockquote></div><br></div>