[arm-allstar] Scheduler reload interval (and how to use the scheduler)

Doug Crompton doug at crompton.com
Wed Mar 9 09:44:20 EST 2016


In all my years of using Allstar I think I used the built-in scheduler about once and that was to test it. The Allstar scheduler is yet another example of internal code which can be run just as well externally using using cron and Linux scripts. cron has 1 minute resolution and immediately updates.
73 Doug
WA3DSP
http://www.crompton.com/hamradio


> Date: Wed, 9 Mar 2016 05:18:49 -0500
> To: arm-allstar at hamvoip.org
> Subject: Re: [arm-allstar] Scheduler reload interval (and how to use the scheduler)
> From: arm-allstar at hamvoip.org
> CC: kb4fxc at inttek.net
> 
> 
> Hi Barry,
> 
> Here is how I understand the basic scheduler operation.
> 
> First, you must add a definition in the rpt.conf node stanza defining the
> scheduler stanza and a valid macro stanza. You also may need a functions
> stanza, depending on what you're trying to do. These definitions only get
> updated when the node is forced to restart--like stopping/starting
> Asterisk or issuing a "rpt reload" from the Asterisk command prompt.
> 
> Once setup properly, the scheduler code in app_rpt.c will try to execute
> every minute, looking (in a somewhat ugly, brute-force way!!) for jobs to
> run. You can enable debugging, which will send messages to the Asterisk
> console related to the scheduler (and many other operations, too). It's
> probably best to initially try this debugging on a quiet, inactive
> node...Or, you'll likely be overrun by the quantity of debug messages!  
> To enable debug, run from the Asterisk console:
> 
> rpt debug level 7
> 
> ...To turn back off:
> 
> rpt debug level 0
> 
> 
> 
> So, here is a working example, using the scheduler to send the current 
> time of day to the defined node, once per minute. All this code is found 
> in the rpt.conf file:
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> [1215]			; Example node number 1215
> functions=funcs33	; Arbitrary names for stanzas...
> macros=macros33
> scheduler=sked33
> 
> [funcs33]	; Customized functions for node 1215
> 81=status,12    ; Time of Day (local only)
> 
> [macros33]	; Customized macros for node 1215
> 1234=*81#	; The number 1234 is arbitrary, 81 is defined in funcs33.
> 
> [sked33]	; Customized scheduler for node 1215
> 1234=* * * * *	; 1234 is defined as a macro. Run macro once a minute.
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> 
> 
> Questions???
> 
> 
> 73, David KB4FXC
> 
> 
> 
> 
> 
> On Wed, 9 Mar 2016, Barry Buelow via arm-allstar wrote:
> 
> > 
> > How/when does the [Schedule] stanza reload.  I've been making some 
> changes and it appears the changes don't take effect immediately (or 
> after an astres.sh).  Do they maybe reload hourly or ???
> > Barry w0iy
> > 
> > 
> > 
> 
> _______________________________________________
> 
> 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/20160309/7e0f1604/attachment-0001.html>


More information about the arm-allstar mailing list