[arm-allstar] Crontab failure
Patrick Perdue
borrisinabox at gmail.com
Thu Jul 6 14:22:42 EDT 2023
Don:
I expect this isn't working because your double quotes need to be
escaped on the crontab itself.
I've not actually tested this, but perhaps the following would work.
00 08 * * * /usr/sbin/asterisk -rx \"rpt fun 530780 *3435450\"
30 12 * * * /usr/sbin/asterisk -rx \"rpt fun 530780 *1435450\"
Just to make things easier for myself, I generally just create small
one-line bash scripts to perform simple connect/disconnects, then call
those from cron instead of doing it there directly.
For example, you could create these two scripts:
</etc/asterisk/local/connect-rpt.sh>
#!/bin/bash
/usr/local/sbin/asterisk -rx ""rpt fun 530780 *3435450"
</etc/asterisk/local/disconnect-rpt.sh>
#!/bin/bash
/usr/local/sbin/asterisk -rx ""rpt fun 530780 *1435450"
Remember to make these two scripts executable.
chmod +x /etc/asterisk/local/connect.sh
chmod +x /etc/asterisk/local/disconnect.sh
Now, call them from cron.
00 08 * * * /etc/asterisk/local/connect-rpt.sh
30 12 * * * /etc/asterisk/local/disconnect-rpt.sh
This also gives you some additional flexibility. For example, you could
play a local announcement one minute before connecting or disconnecting
from that node, etc.
HTH.
73
N2DYI
On 7/6/2023 11:49 AM, Don VA7QU Poaps via ARM-allstar wrote:
> I have been having an issue with my PI4 not connecting to 435450 at 8 am
> and disconnecting at 12:30.
>
> I can manually connect and disconnect. I have no idea how to rectify.
>
>
> # Do not remove the following line
> # required for lsnodes and allmon
> 15 03 * * * cd /usr/local/sbin; ./astdb.php cron
> 00 0-23 * * * (source /usr/local/etc/allstar.env ; /usr/bin/nice -19
> /usr/bin/p$
> 00 03 * * * sudo shutdown --reboot
> 00 08 * * * /usr/sbin/asterisk -rx "rpt fun 530780 *3435450"
> 30 12 * * * /usr/sbin/asterisk -rx "rpt fun 530780 *1435450"
>
> By the way I'm on their whitelist to connect to repeater.
>
> 73
>
>
>
> *Don PoapsNew Westminster, BC*VA7DGP DATA
> VA7QU VOICE
>
>
>
>
>
>
> *Winlink: va7dgp at winlink.org <va7dgp at winlink.org>Subject://wl2k
> ALLSTAR 530780Hamshack Hotline*
>
> *5971*
> *Mid-Island Phone Mesh*
> *2210*
> *2232*
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list