@program mufcron.muf 1 1000 d i $note MUF based cron daemon, make things run on any interval of minutes ( (C) 2003 Alynna Trypnotk Release Terms: GNU GPL v2, http://www.gnu.org/licenses/gpl.html Use anywhere, dont remove credits, return improvements to alynna@animaltracks.net Installation: 1. Upload 2. @tune cron_prog=mufcron.muf 3. @tune cron_interval=0d 0:01:00 4. @reg mufcron.muf=muf/cron ) $author Alynna $version 1.03 ( Program implements propqueues. @mufcron/1 called every one minute @mufcron/30 every 1/2 hr and so on. To use just place the program in the desired propqueue @propset #0=d:@mufcron//:/& Programs must be set L to run from MUFCron. Meaning that they can be disabled by removing their L bit. This program exports mufcron? which can be called from your program to easily determined if it was called by MUFCron. Pass it the arguments of the program, returns 0 if it wasnt called by MUFcron, 1 if it was. Example: : main dup mufcron? if pop cron-call else param ! then ; ) lvar param $libdef mufcron? : mufcron? ( s -- i ) command @ "Queued Event." smatch if "MUFCron" smatch if 1 else 0 then else 0 then ; PUBLIC mufcron? : main var item var value var sysheart ( increment the cron daemon ) systime 60 / sysheart ! ( what propqueues exist ) #0 "/@mufcron" array_get_propdirs foreach item ! pop ( if sysheart mod propqueue = 0 ) sysheart @ item @ atoi % not if ( run the specified propqueue ) prog "/@mufcron/" item @ strcat #0 "MUFCron" propqueue then repeat ; . c q @tune cron_prog=mufcron.muf @tune cron_interval=0d 0:01:00 @reg mufcron.muf=muf/cron @set $muf/cron=L