Skip to main content
Known Participant
March 26, 2008
Question

Time related conditional build

  • March 26, 2008
  • 8 replies
  • 466 views
I need to create a build that will allow pages to be viewed during a certain period of time, say Friday mornings, but would not be displayed during the rest of the week. Is this possible? If so, how is it done?

Thanks in advance.
    This topic has been closed for replies.

    8 replies

    bigbrookAuthor
    Known Participant
    March 26, 2008
    Thanks - I will look into both options
    RoboColum_n_
    Legend
    March 26, 2008
    Don't worry about the duplicate posts. They sometimes happen on these forums.

    Unfortuately I was shooting from the hip with this suggestion as I only have RHX5 installed and have experience at either command line compiling or creating batch files. You could start by looking at the RH help file for details of compiling your output via the command line. Once you have that set-up, you would have to find someone with experience of creating a batch file (e.g. a developer) to write something for you to kick off the command line prompt.

    Sorry I can't be of much more help. Maybe there is someone else out there in forumland who can provide further info?
    Captiv8r
    Legend
    March 26, 2008
    Hi all

    bigbrook, I'm thinking what you want could be accomplished using JavaScript to parse the times and dates, then redirecting accordingly. Not sure if you are familiar enough with JavaScript coding to not let this intimidate you, but it should be doable.

    Cheers... Rick
    bigbrookAuthor
    Known Participant
    March 26, 2008
    Sorry about the duplicate. For some reason I'm getting scripting errors with everything I do on this site.
    bigbrookAuthor
    Known Participant
    March 26, 2008
    We are using version 7 so this option might work. How would one go about doing that?
    bigbrookAuthor
    Known Participant
    March 26, 2008
    We are using version 7 so this option might work. How would one go about doing that?
    RoboColum_n_
    Legend
    March 26, 2008
    Just a thought....

    .....you don't say which version of RH you are using but RH6 onwards has a command line prompt facility. Maybe you could setup your compile to run from the command line and then generate a batch file to run at set days/times.
    bigbrookAuthor
    Known Participant
    March 26, 2008
    We have thought of just switching pages, that is what we are doing now actually. However I would like the switch to happen automatically.

    What we are doing is offering a class at a certain time and the page we are displaying provides links to secured areas where we don't want people playing when the class is not open. Therefore, I want the link page just to say something like links are only available during class time when it is out of the appropriate time frame. And I want it to do that without having to manually replace the pages.

    Does this make sense?
    RoboColum_n_
    Legend
    March 26, 2008
    There is nothing in the standard RH functionality to allow what you want. You don't say what output you are producing but if it is webhelp you could generate two different types of output and ensure the correct one is published for the relevant time period. You could use build tags to maintain the relevant output from the same source. It would just be something to remember to do each Friday morning.