Hack of the Whenever I Get Around to It

December 10, 2006

Snowday SMS

Filed under: Uncategorized — Chris Merck @ 9:55 pm

School closing information is time-critical. Knowing you don’t have to go to school today five minutes before the rest of the mob can give you great satisfaction – Wouldn’t it be nice to get a text message as soon as the closing/delay information becomes available? Then you can sit at home, relax, and enjoy the fresh morning snow…

Unfortunately we have had next to no snow recently, so the blizzard photo is courtesy of Richard Harvey (a sweet image of Snow covered A6024 Woodhead Road, into Holme Village, Yorkshire, England in the Winter of 1978).

Back when we did get snow on the east coast, ciphercast and I hacked together this automatic snowday text-message daemon, written in bash (UNIX shell script). It was my first attempt at web parsing and at automatic SMS sending. I realize now that this could be done in python much easier/better but this script may be of interest anyway.

The script runs on a Linux (or Cygwin/Windows) PC that is allways on and connected to the internet (a server), and repeatedly checks the school district website for the text “schools closed” and if/when it is seen, it sends a text message to each of a list of Verizon cellphone numbers by emailing @vtext.com. You don’t even need to open the message as the first few characters give it away: School Closed!

A nice extension to this would be to send to any phone number… maybe the script could detect what phone company owns the line, and select the appropriate method of sending the text message, as right now it only sends to Verizon customers.

Of course this can be adapted to report any kind of change of status in a web page. It is an example of the power of automated text messaging.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: