Scheduler (ASL System): Difference between revisions

From AllStarLink Wiki
Jump to navigation Jump to search
Created page with "==ASL SYSTEM Scheduler== Not to be confused with the system CRON, the system schedular is owned and controlled by ASL/app_rpt To schedule anything, you should first declare w..."
 
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
==ASL SYSTEM Scheduler==
==ASL SYSTEM Scheduler==
Not to be confused with the system CRON, the system schedular is owned and controlled by ASL/app_rpt
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 what 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]


==Setting-Up the system schedular==
For the system scheduler can 'ONLY' trigger a 'MACRO'. So, you first must create or pick a macro to run.


Multiple entries by line(s) in the following format:


==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


(macro to run when true)= (MM) (HH) (DayOfMonth) (MonthOfYear) (DayOfWeek)


For day of week, Sun starts as 0 (zero) and add one for each later dow as Saturday is 6.
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.
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:===
===Examples:===
Line 23: Line 29:


91=40 3 * * *  ;/tmp cleanup script every 12hrs 3:40a
91=40 3 * * *  ;/tmp cleanup script every 12hrs 3:40a
92=40 15 * * *  ;/tmp cleanup script every 12hrs 15:40p
92=40 15 * * *  ;/tmp cleanup script every 12hrs 15:40p


Line 32: 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===
When the TIME / DATE statement is true, the selected macro will be run once only until true again.
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.

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.