2 Replies Latest reply on Jan 22, 2014 2:23 PM by JoelShapiro

    daily scheduled script within frequent scheduled script, or separate?

    JoelShapiro

      Hi all

       

      I'm seeking recommendations.

       

      I've got a client with a scheduled FM script running every 15 mins on their FMS12. There's now a need to add a scheduled script to run once nightly. Would it be preferable to include the daily script (as a sub-script) inside the 15-min script, within an IF Get ( CurrentTime ) clause -- so to keep the number of scheduled scripts to just one for this DB -- or would it be better to have 2 scheduled scripts: every-15-mins + nightly? Since their FMS is hosting a number of different solutions, I thought it might be cleaner to just keep it to one scheduled script per solution (especially if some day they might need an hourly script, etc.), but maybe that's not the best way to go...

       

      TIA,

      -Joel

        • 1. Re: daily scheduled script within frequent scheduled script, or separate?
          steve.winter

          Hey Joel

           

          Could I propose a third alternative...? if you're keen to keep to FMS calling a single script every 15 min (I see the logic in this, it makes it more portable, fewer schedules in FMS etc), then rather than the nightly script being a sub script of the current 15 minute job, I'd suggest creating another new script which acts as your 'controller' in FM...

           

          At this point that script will check to see if it's the right time to run the nightly script and do that as a subscript, plus also run the current script every time (as a subscript)...

           

          In this way you're not 'polluting' your current script with things which don't belong (the time check and call of the subscript) and it also makes your extension concept smoother too, since in that way all the time-based logic, and the processing of subscripts can be done in that controller script...

           

          Just a thought (and HNY and how the devil are you?

          Steve

          • 2. Re: daily scheduled script within frequent scheduled script, or separate?
            JoelShapiro

            Hey Steve!

             

            Thanks for the reply

             

            Actually, the every-15-mins script is already what you're calling a "controller" script.  I've discovered that it's easier to have one scheduled script (called something like "Server__ScheduledScripts_15min") that runs whatever subscripts are appropriate (discovered when a client once changed a script name and its respective schedule broke).

             

            Glad to hear you think adding a nightly script into the current "controller" script makes sense

             

            Cheers,

            -Joel