Scheduler (ASL System): Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
To schedule anything, you should first declare what it is you want to do by [https://wiki.allstarlink.org/wiki/Macro_use_and_format making a MACRO for it in rpt.conf] | To schedule anything, you should first declare what it is you want to do by [https://wiki.allstarlink.org/wiki/Macro_use_and_format making a MACRO for it in rpt.conf] | ||
For the system scheduler can 'ONLY' trigger a 'MACRO'. So, you first must create | For the system scheduler can 'ONLY' trigger a 'MACRO'. So, you first must create or pick a macro to run. | ||
==Setting-Up the system scheduler== | ==Setting-Up the system scheduler== | ||
Multiple entries by line(s) in the following format: | Multiple entries by line(s) in the following format that contains 5 time fields plus the macro#: | ||
(macro to run when true)= (MM) (HH) (DayOfMonth) (MonthOfYear) (DayOfWeek) | (macro# to run when true)= (MM) (HH) (DayOfMonth) (MonthOfYear) (DayOfWeek) each separated by a space | ||
Line 39: | Line 39: | ||
99=00 18 25 12 * ; merry xmas announcement 6pm dec 25 | 99=00 18 25 12 * ; merry xmas announcement 6pm dec 25 | ||
===Enable / Disable=== | |||
There are COP commands for turning the scheduler on and off set in rpt.conf | |||
xxx=cop,15 ; Scheduler enable | |||
xxx=cop,16 ; Scheduler disable | |||
There is also a setting in control_states if you want to set this in a personality profile. | |||
skena | |||
skdis | |||
Or a command line: | |||
rpt fun skdis xxxxx | |||
rpt fun skena xxxxx | |||
===Summary=== | ===Summary=== |
Latest revision as of 14:43, 16 September 2024
ASL SYSTEM Scheduler
Not to be confused with the system CRON, the system scheduler is owned and controlled by ASL/app_rpt
To schedule anything, you should first declare what it is you want to do by making a MACRO for it in rpt.conf
For the system scheduler can 'ONLY' trigger a 'MACRO'. So, you first must create or pick a macro to run.
Setting-Up the system scheduler
Multiple entries by line(s) in the following format that contains 5 time fields plus the macro#:
(macro# to run when true)= (MM) (HH) (DayOfMonth) (MonthOfYear) (DayOfWeek) each separated by a space
For day of week, Sun starts as 0 (zero) and add one for each later dow as Saturday is 6.
Any item that is all inclusive or 'don't matter/every' can be set with a star ' * ' as a wildcard.
There must be 5 time/day entries, STAR included.
Examples:
1=00 06 * * * ;(run macro 1 at the 6th hour of any day)
51=05 * * * * ;update wx fcst at 05min every hour every day
91=40 3 * * * ;/tmp cleanup script every 12hrs 3:40a
92=40 15 * * * ;/tmp cleanup script every 12hrs 15:40p
93=59 23 * * * ; archive logs daily at 59th min of only the 23rd hour every day.
94=59 20 * * 5 ; start net links at 8:59 on Friday
99=00 18 25 12 * ; merry xmas announcement 6pm dec 25
Enable / Disable
There are COP commands for turning the scheduler on and off set in rpt.conf
xxx=cop,15 ; Scheduler enable
xxx=cop,16 ; Scheduler disable
There is also a setting in control_states if you want to set this in a personality profile.
skena
skdis
Or a command line:
rpt fun skdis xxxxx
rpt fun skena xxxxx
Summary
When the TIME / DATE statement is true, the selected macro will be run once only until true again.
You should create comments on each line to remember what it is for in the case you need to make adjustments later.