[App_rpt-users] Time

Tim Sawyer tim.sawyer at me.com
Wed Aug 7 16:50:55 UTC 2013


Having the availability to use cron is one of the many great things about app_rpt. Here are a couple entries from my crontab. The first plays the time once every 3 hours between 6am and 9pm everyday. The second entry announces our net on Mondays between 6:10am and 7:10pm. 

Both cron entries call scripts but the way Geoff did it is perfectly fine, it just a mater of preference. Also note the use of cmd and localplay rather than fun in these scripts. That way if the touch tones ever need to be changed the scripts will still run without modification. 

>crontab -l
00 6-21/3 * * * /root/bin/2532time.sh
10 6-19 * * 1 /root/bin/racesnettonight.sh 

Here are the scripts:
>cat /root/bin/2532time.sh
#! /bin/bash
/usr/sbin/asterisk -rx "rpt cmd 2532 status 12 0"

>cat /root/bin/racesnettonight.sh
!# /bin/bash
/usr/sbin/asterisk -rx "rpt localplay 2532 racesNet"

--
Tim
:wq

On Aug 7, 2013, at 7:21 AM, Geoff <w5omr at att.net> wrote:

> On 08/01/2013 12:38 PM, Bryan D. Boyle wrote:
>> read a msg i sent last night...it's in there as one of my examples...
>>> Hello everyone,
>>> How do I setup my node to say time every hour. I'm using Acid on a neoware ca22. And where should I put it? N5zua sit this up for me a few years ago. So, seems to me, I need to to know the system and play with it.
>>> 
> 
> I've been wanting to do the same, but didn't really want the silly thing screaming the time all night long so, cron to the rescue!
> 
> root at w5omr> crontab -e
> 0 6-22 * * 1-5 /usr/sbin/asterisk -rx "rpt fun 29655 *81"
> 0 8-22 * * 0,6 /usr/sbin/asterisk -rx "rpt fun 29655 *81"
> 
> The first is to chime the hour, starting at 6am, and ending at 10pm, Mon - Fri.
> Weekends, we sleep in... start at 8am, end at 10pm, Saturday and Sunday.
> 
> At least, that's -one- way of doing it.
> 
> I'm sure it was you, Bryan, I have to thank for posting that commands could be passed to a running session of asterisk.  That's when the light went off.  Cron to the rescue ;-)
> 
> This is useful also, if you want to setup times to link to specific nodes, at a specific time.  Figure out the schedule and cron it.
> 
> Here's a good link if some system operators would like to know about cron
> http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/
> 
> 
> 73 = Best Regards,
> -Geoff/W5OMR
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at ohnosec.org
> http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20130807/12f5c6e5/attachment.html>


More information about the App_rpt-users mailing list