Action based on a file on the server (which is placed as a result of a script)
-
Here’s the big picture.
I have a daycare website. When the bad weather comes, I would like the website to automagically pick up that the school has been closed, and update WordPress to either place a pre-defined text widget into the sidebar, activate an interstitial page, or something of that nature.
The automagically part is easy – there is a local tv station that publishes their closings as a feed, and I can run a cron job that looks at the feed, checks to see if “my school” is listed, and set a file into place, then on the next round, if “my school” is no longer listed, either update the file or remove the file.
Ideally, this would work much like maintenance mode. My checking the tv feed script can run a ‘touch .schoolclosed’ file if found, then in WP, the same method of checking for maintenance and sending the maintenance page can insert an announcement banner.
- The topic ‘Action based on a file on the server (which is placed as a result of a script)’ is closed to new replies.