app_rpt Macro and Scheduler

First I should lightly define this for those that do not understand.

A MACRO is a single or multiple set of commands to be executed by a single simple command.

You could use it to have a user command that executes a string of commands making the entire function easy to preform for any user. An example would be to make several link connections with just a 4 digit macro command. It is all about what you put in the MACRO.

To my knowledge, you can not make a macro do anything you could not do with a command directly because you are entering actual commands to be executed. Need more… You can  execute a system/asterisk command line that would make just about anything possible within a script file but it has to be defines as a command first. Use your macro to call that command

Set-up for these are in rpt.conf

They are programed in this fashion,

A number for the macro (will be the executing command #)

A equals sign =

each command as you might issue to it from the keypad but separated by a space

after the last command in the string, end with a pound sign # (space#)

The format looks like this for a macro number of 10:

10=*81 *229285 #

So if you were to enter *5 10 ,  it would execute macro 10 (*5 is the command to execute a macro and the 10 is the macro we are executing). Our example here macro 10- plays the time (*81) and then makes a link connection for monitor (*2) on node (29285)

This can be a powerful way to make complex functions work in a simple way. Use your imagination and you can dream up some pretty snazzy stuff.

What makes this even more powerful, The scheduler.

The scheduler allows you to automatically “EXECUTE A MACRO” at a given time of day and/or date. A macro is the only thing the scheduler can execute. So if you want to automate, start with the macro.

Here is the format (like system cron for those familiar with linux)

First item in the string is the macro number we are going to execute at the chosen time. It must be a macro number you have defined in MACROS

After the macro number, a equal sign, then the time of execution in this format.

Minutes, Hour, DayofTheMonth, Month, DayOfTheWeek (seperated by a space) and use a STAR “*” for a wildcard, meaning it could match anything in that position.


10=00 * * * *

This will execute macro 10 on the top of the hour (at 00 minutes of any hour , any day of the month, any month, any day of the week)

1=05 * * * 0

This will execute “macro 1” at 5 minutes into any/every hour but only on Sunday (0=sunday 6=saturday…    computer logic numbers)

2=30 12 * * * ; execute macro 2 at 12:30 everyday

3=15 18 25 12 * ; execute macro 3 at 6:15pm christmas day

Remember you must “specify all 5 time parameters”. If it does not matter, it is a * -wildcard or it might not work.

Be certain to think your scheduler and macros through. Understand the implications of what you are doing. Test the macros out for functionality before setting them on a schedule (*5xx).

Handy functions for this are things like the hourly time announcement, disconnecting links after late hours, playing voice announcements, disabling functions for late at night and turning them back on in daytime. etc.