-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMyrddin's MUSH CRON - MCRON.txt
executable file
·12 lines (10 loc) · 1.58 KB
/
Myrddin's MUSH CRON - MCRON.txt
1
2
3
4
5
6
7
8
9
10
11
12
@@ DEPENDENCIES - CORE
th u(NEWCOBJ,Myrddin's MUSH CRON <MCRON>,mcron,,,,WIZARD SAFE,INHERIT SIDEFX SAFE)
&CREDITS [u(cobj,mcron)]=mushcron was coded by Myrddin (merlin@firstmagic.com). Permission is granted to distribute the code freely as long as the initial CREDIT attribute is kept intact. This code is located at www.firstmagic.com/~merlin/mushcode
&CRON [u(cobj,mcron)]=@trigger me/cronjobs;@wait 60={@trigger me/cron}
&CRONJOBS [u(cobj,mcron)]=@dolist/inline setq(8,time())[setq(1,extract(%q8,2,1))][setq(2,extract(%q8,3,1))][setq(3,extract(%q8,1,1))][setq(4,extract(extract(%q8,4,1),1,1,:))][setq(5,extract(time(),2,1,:))][lattr(me/cron_time_*)]={@switch cand(cor(member(extract(setr(0,v(##)),1,1,|),%q1),not(strlen(extract(%q0,1,1,|)))),cor(member(extract(%q0,2,1,|),%q2), not(strlen(extract(%q0,2,1,|)))),cor(member(extract(%q0,3,1,|),%q3),not(strlen(extract(%q0,3,1,|)))),or(member(extract(%q0,4,1,|),%q4), not(strlen(extract(%q0,4,1,|)))),cor(member(extract(%q0,5,1,|),%q5),not(strlen(extract(%q0,5,1,|)))))=1,{@attach %!/INC`MSG`CHAN=Triggering CRON_JOB_[extract(##,3,1,_)];@trigger me/cron_job_[extract(##,3,1,_)]=last(%q0,|)}}
&DESCRIBE [u(cobj,mcron)]=repeat(=,78)%r%b[iter(lattr(me/cron_time_*),ljust(rest(rest(##,_),_),25)[v(##)]%r)][repeat(-,78)]%rPattern of CRON_TIME_* attributes:%r%t<month>|<date>|<day of week>|<hour>|<minute>|<args>%r(ex. Mar||Sun|04|54| would trigger a cron job at 4:54am every sunday in the month of march)%r[repeat(=,78)]
@set [u(cobj,mcron)]=MASTER_LST:%b
&NXT_MESS [u(cobj,mcron)]=
&STARTUP [u(cobj,mcron)]=@trigger me/cron
&SYSTEM`NAME [u(cobj,mcron)]=MUSHCRON