<div dir="ltr"><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,sans-serif;font-size:15px">Re: crontab schedule repeater announcements</span><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,sans-serif;font-size:15px"><br></span></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,sans-serif;font-size:15px">I corrected earlier issues with not calling ann01.sh script from crontab. I can now cron into annun01.sh and ann01.sh works fine IF I say send a text to a file. </span></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,helvetica,sans-serif;font-size:15px">echo "Hello World" >> test </span><span style="font-family:arial,sans-serif;font-size:15px"><br></span></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,sans-serif;font-size:15px"><br></span></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,sans-serif;font-size:15px">It errors with "can not open file" if the ann01.sh script is trying to run a command line command or "localplay" to run a recorded voice file.</span></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><div class="gmail_default" style="font-family:arial,sans-serif;font-size:15px"><font face="arial, helvetica, sans-serif">asterisk -rx "rpt fun 42996 *970" </font><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif;font-size:15px"><font face="arial, helvetica, sans-serif">/usr/sbin/asterisk -rx "rpt fun 42996 *970"</font></div><div class="gmail_default" style="font-family:arial,sans-serif;font-size:15px"><font face="arial, helvetica, sans-serif"> </font><span style="color:rgb(0,0,0);font-size:medium;white-space:pre-wrap;font-family:"comic sans ms",sans-serif">asterisk -rx "localplay 42996 /etc/asterisk/scripts/ann01"</span><span style="font-family:arial,helvetica,sans-serif"> </span></div><div class="gmail_default" style="font-family:arial,sans-serif;font-size:15px"><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:arial,sans-serif;font-size:15px"><span style="font-family:arial,helvetica,sans-serif">Thanks,</span></div><div class="gmail_default" style="font-family:arial,sans-serif;font-size:15px"><span style="font-family:arial,helvetica,sans-serif">Duane</span></div></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><span style="font-family:arial,sans-serif;font-size:15px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 27, 2017 at 12:00 PM, <span dir="ltr"><<a href="mailto:app_rpt-users-request@lists.allstarlink.org" target="_blank">app_rpt-users-request@lists.allstarlink.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send App_rpt-users mailing list submissions to<br>
<a href="mailto:app_rpt-users@lists.allstarlink.org">app_rpt-users@lists.<wbr>allstarlink.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<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>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:app_rpt-users-request@lists.allstarlink.org">app_rpt-users-request@lists.<wbr>allstarlink.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:app_rpt-users-owner@lists.allstarlink.org">app_rpt-users-owner@lists.<wbr>allstarlink.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of App_rpt-users digest..."<br>
<br>Today's Topics:<br>
<br>
1. Re: crontab schedule repeater announcements (David KE6UPI)<br>
<br><br>---------- Forwarded message ----------<br>From: David KE6UPI <<a href="mailto:dshaw@ke6upi.com">dshaw@ke6upi.com</a>><br>To: Users of Asterisk app_rpt <<a href="mailto:app_rpt-users@lists.allstarlink.org">app_rpt-users@lists.allstarlink.org</a>><br>Cc: <br>Date: Fri, 27 Jan 2017 07:41:58 -0800<br>Subject: Re: [App_rpt-users] crontab schedule repeater announcements<br><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/announ<wbr>cements01.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><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" target="_blank">App_rpt-users@lists.allstarlin<wbr>k.org</a><br>
<a href="http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users" rel="noreferrer" target="_blank">http://lists.allstarlink.org/c<wbr>gi-bin/mailman/listinfo/app_rp<wbr>t-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/c<wbr>gi-bin/mailman/listinfo/app_rp<wbr>t-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>
<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></blockquote></div><br></div>