[arm-allstar] Cron Jobs

Doug Crompton doug at crompton.com
Thu May 5 12:43:36 EST 2016


Dave,

 Remember that cron is 24 hour time. So 9PM would be 21 00 or reverse in cron. The correct way would be: 

To disconnect all nodes

20 21 * * 1 /usr/sbin/asterisk -rx   "rpt fun <yournode> *76"   

or to just specifically disconnect a node

20 21 * * 1 /usr/sbin/asterisk -rx "rpt fun <yournode> *7127225"   

Connecting

50 20 * * 1 /usr/sbin/asterisk -rx "rpt fun <yournode> *7327225"

<yournode>  is the node on your server you want to apply the command to. Of course no < or > around it, just the node number. It must be a node on your server.

Also I don't usually do it this way. I call scripts instead like this -

00 18 20 12 * /etc/asterisk/local/alaska_connect

The script would look like this -

#! /bin/bash
#
/usr/sbin/asterisk -rx "rpt fun 27225 *7327133"

Either way works fine. It is your preference. The advantage of the script is you could also call it with DTMF if programmed in rpt.conf functions.

73 Doug
WA3DSP
http://www.crompton.com/hamradio


> Date: Wed, 4 May 2016 18:01:10 -0700
> To: arm-allstar at hamvoip.org
> Subject: Re: [arm-allstar] Cron Jobs
> From: arm-allstar at hamvoip.org
> CC: david at lang.hm; mrpjf150 at gmail.com
> 
> On Wed, 6 Apr 2016, Pete Fierro via arm-allstar wrote:
> 
> >  Hello
> >
> >    Tinkering with scripting here.I want to connect to the ARRL News Monday
> > night&want the scripts to do this while I'm  away.Here is what I have
> >
> > To disconnect
> >
> > 20  9 * * 1/usr/sbin/asterisk -rx   "rpt fun 27225 *76
> >
> > Connecting
> >
> > 50  8 * * 1 /usr/sbin/asterisk -rx "rpt fun 27225 *73
> >
> >  Entered crontab -e I see both files there.Do these files need to be put
> > in nsomeplace else to be executable?Or are they executable now?
> 
> I know this is an old post, but crontab received a significant upgrade several 
> years ago and there is an /etc/crontab file that takes one additional argument 
> between the timeing and the command, what user to run as.
> 
> The advantage is that your commands are not scattered over many files, and you 
> don't have to use the crontab -e command to edit them, this file can be managed 
> with any editor or config management tool.
> 
> David Lang
> _______________________________________________
> 
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> 
> Visit the BBB and RPi2 web page - http://hamvoip.org
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20160505/1a7fe2ba/attachment-0001.html>


More information about the arm-allstar mailing list