[arm-allstar] Cron help
Brett Friermood
brett.friermood at gmail.com
Wed Jul 1 11:35:26 EST 2015
Write a simple shell script with the commands to disconnect the 4 nodes.
Then use cron to run that script rather than the commands directly.
Sample Script:
#! /bin/bash
/usr/sbin/asterisk -rx "rpt fun 27806 *141630"
/usr/sbin/asterisk -rx "rpt fun 27806 *141631"
/usr/sbin/asterisk -rx "rpt fun 27806 *141632"
/usr/sbin/asterisk -rx "rpt fun 27806 *141633"
Sample crontab entry:
0 22 * * * /path/to/script
This example would disconnect nodes those four nodes every night at 10:00.
An alternative would be to put the individual commands in cron for the same
time, but the script way is cleaner.
Brett KQ9N
On Wed, Jul 1, 2015 at 11:25 AM, Robert Newberry <N1XBM at amsat.org> wrote:
> I use a cron to disconnect and reconnect nodes at certain times.
>
> I typically do this.
>
> # Disconnect node 41630 at 2053 Monday and Reconnect at 2142
> 53 20 * * 1 /usr/sbin/asterisk -rx "rpt fun 27086 *141630"
> 42 21 * * 1 /usr/sbin/asterisk -rx "rpt fun 27086 *341630"
>
> I'd like to be able to disconnect 4 nodes at once at a certain time. As
> you can see I currently disconnect one node at a set time. Where I want to
> disconnect 4 nodes at once at a set time. I do not care about reconnecting.
>
> N1XBM
> Apparare Scientor
> Paratus Communicare
> Allstar Node # 27086, 41540, 41812
>
> _______________________________________________
>
> 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/20150701/b91cf2b8/attachment.html>
More information about the arm-allstar
mailing list