Bret,<br>Thanks for sharing, we appreciate it!<br>-MC<br><br><div class="gmail_quote">On Fri, Oct 23, 2009 at 11:43 AM, Trixter aka Bret McDanel <span dir="ltr"><<a href="mailto:trixter@0xdecafbad.com">trixter@0xdecafbad.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">for anyone that is interested, in<br>
<SRC>/contrib/trixter/scheduled_event.lua there is a script, which<br>
admittedly is not very well tested (written last night) that allows for<br>
mysql events to be scheduled to be run.<br>
<br>
Why mysql and not sched_api or similar? Well this allows the scheduled<br>
events to survive past a reboot, shutdown, crash, alien abduction, or<br>
other issue. It also is written in a way to allow for many switches to<br>
each pull an event off one at a time and process them, thus distributing<br>
the load. sched_api requires that the scheduled event exist on a<br>
particular switch which can be a bit messy in some applications.<br>
<br>
So you can do a "hotel style wake up call" (good for getting out of<br>
boring meetings or bad blind dates) or really anything you want.<br>
<br>
You can start/stop the script, even change the DB credentials without a<br>
restart to allow for easier load management or maintenance.<br>
<br>
Its a trivial script, but I didnt see anything like this elsewhere. If<br>
people have specific feature requests (like adding a machine column to<br>
the table so that certain events can be scheduled only for specific<br>
machines, or only pulling events when the load is under X) let me know<br>
and I will look into doing that.<br>
<br>
The only problem that I saw last night was that it runs every<br>
"heartbeat" (FS eventing system) and if you have more tasks to<br>
accomplish in a given interval it can get a little backlogged and does<br>
not do any notification to that effect.<br>
<br>
<br>
--<br>
Trixter <a href="http://www.0xdecafbad.com" target="_blank">http://www.0xdecafbad.com</a> Bret McDanel<br>
pgp key: <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8AE5C721" target="_blank">http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8AE5C721</a><br>
<br></blockquote></div><br>