[arm-allstar] Crontab failure

Bill Paulus bpaulus at comcast.net
Thu Jul 6 16:54:37 EDT 2023


Don This is how I do it with my nodes 
00 08 * * * (source /usr/local/etc/allstar.env ; /usr/sbin/asterisk -rx "rpt
cmd $NODE1 ilink 13 435450" &> /dev/null)
30 12 * * * (source /usr/local/etc/allstar.env ; /usr/sbin/asterisk -rx "rpt
cmd $NODE1 ilink 11 435450" &> /dev/null)
Bill Paulus    
KD2EOY 
Allstar Node #526084 
(609) 694-7976
Vice President SCARA 
WWW.K2BR.COM
Southern Counties Amateur Radio Association



-----Original Message-----
From: ARM-allstar <arm-allstar-bounces at hamvoip.org> On Behalf Of Patrick
Perdue via ARM-allstar
Sent: Thursday, July 06, 2023 2:23 PM
To: ARM Allstar <arm-allstar at hamvoip.org>
Cc: Patrick Perdue <borrisinabox at gmail.com>
Subject: Re: [arm-allstar] Crontab failure

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
_______________________________________________

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