Conditional layout scheduling

I want to be able to bind the playback of an layout to a condition.

This condition could be anything:

  • Result of an Http Request (HTTP-Status-Code, existence of specific content on the page)
  • Result of an System CMD

Situation: I have got a layout with a website as media. This website is selfmade. At some time in day the Website does not show an data anymore (this time is unknown). Now I want to display another (default) layout, when the website has no content to show anymore. Right now, the content is shown as configured in the calendar.

I think of creating conditions, parallel to the calendar events in the CMS, that are distributed to the clients. The condition could then be connected to an layout. On the Client-Side: Before the layout is played, the condition will be checked. If the condition results to false, the next or the default layout will be played back.