. . .or re-boot the box ??

I just got handed a request: develop a script
that will check IIS status every so often, and if it isn't responding, stop and start the IIS service, or, alternately, re-start the box.

I was planning on using AT to run the script, but has anyone done anything REMOTELY like this in Kixtart ???