<p>How do I have a script run every, say 30 minutes?  I assume there are different ways for different OSs.  I'm using OS X.</p>

On MacOSX, you have at least the following options:
Recurring iCal alarm with a "Run Script" action
launchd
cron (
link1
,
link2
)
From personal experience, cron is the most reliable. When I tested, launchd had a number of bugs and quirks. iCal alarms only run when you are logged in (but that might be something you prefer).