Monday, July 22, 2013

Deadman Switch For Website

I hate to sound morbid, so think of this as possibly a "sitting in a hospital bed, too sick to modify website" switch as well.  If, for any reason, I was too sick or dead to get on the web and modify the ScopeRoller website to indicate that I could not fill orders, I would like for the site to stop accepting orders.  At the same time, I don't want to make the cutoff on the PayPal side of things, because contributions drip in occasionally that way.

Ideally, I would upload a replacement for the part of the ScopeRoller website where the user clicks buttons that place orders so that the buttons were either disabled, or put up a message that said, "Due to illness, this website is not currently accepting orders."  I suppose that I could set up an FTP script to upload a modification to the code shared across all the different pages to do that, and set it up to run every week, but I really only want that to run if I haven't explicitly told my PC, "Hey, I'm still here."  Or should I just leave an FTP script to do this that is simple enough to leave to next of kin to run?

Any suggestions?

5 comments:

  1. Say more about your webhost: is it just a virtual web account, or do you have access to the whole (possibly virtual) machine, e.g. crontab so you can set up scheduled tasks?

    ReplyDelete
  2. Could you not do a simple date check of your latest blog posting and if one hasn't occurred in the last x days a script runs to display your "I'm dead or gone" message?

    ReplyDelete
  3. Kirk: I suspect that I do not have access to the machine. But crontab is a good idea.

    Rounds: Interesting approach: read my blog, parse the date field, and use that!

    ReplyDelete
  4. Rounds' approach isn't just interesting, it's genius! Not only does it solve your original problem, but it keeps you cranking out blog content. Sweet...

    ReplyDelete
  5. Yeah, I'd leave instructions for your estate/next of kin to follow.

    (The small problem with an automated system, of course, is that if you forget it's there when you go on vacation or suchlike, it scares the bejeezus out of everyone.)

    ReplyDelete