I am having trouble getting crontab to schedule playing repeater announcements. I have successfully recorded IAX speech to "prompt01.gsm". I created a script /etc/asterisk/scripts/announcements01.sh. #!/bin/bash # Script plays prompt01 audio files over local node (repeater) PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /usr/sbin/asterisk -rx "rpt localplay 42996 /etc/asterisk/scripts/prompt01" Via terminal, I can enter "announcements01" and hear the node play the repeater announcements. My crontab -e is: SHELL=/bin/bash PATH=~/sbin:/bin:/usr/sbin:/usr/bin:/etc/asterisk/scripts MAILTO=root HOME=/ # I have tried all the following script treatments! # m h dom mon dow command * * * * * ./announcements01 * * * * * ./announcements01.sh * * * * * . /announcements01.sh # dot space announcements01.sh * * * * * announcements01.sh # chmod u-x announcements01.sh (to make executable) ------------------------------------------------------------------------------------------------------------------- I have used the crontab to pass text to a file every minute..no problems; so cron is running. I am logged into ROOT. Any suggestions as to HOW to get crontab to run my announcements01.sh script would be MUCH appreciated! 73, Duane KA1LM
On 1/24/17 9:41 PM, DuaneVT . wrote:
MAILTO=root
Are you getting e-mail messages to root with the errors, if any?
* * * * * ./announcements01 * * * * * ./announcements01.sh * * * * * . /announcements01.sh # dot space announcements01.sh * * * * * announcements01.sh # chmod u-x announcements01.sh (to make executable)
If the file is "announcements01.sh" in the /root directory, try /root/announcements01.sh as the path for the crontab entry. If I'm reading your crontab entry correctly, your system is trying to find the file at /announcements01 or /announcements01.sh but I think you might have it saved it /root/announcements01.sh -- just a guess though. (And you want u+x, not u-x, aka "chmod 0755 announcements01.sh") -- _ | | |-| | |pu <apu@spfld.com> http://www.spfld.com/
participants (2)
-
Apu -
DuaneVT .