4 Replies Latest reply on Jun 18, 2013 9:32 PM by StephenWonfor

    OnTimer Query

    StephenWonfor

      Hi

       

      I am rather amazed to find out that I have not played yet with OnTImer. Now I need to.

       

      I have a script that uses a webviewer to download a file from the backend of a client website - hence I can not run server-side.

      I would like to run the routine every 10 minutes from 6 am to 6 pm Monday to Friday.

      This will also be on a Robot machine - an old iMac running Leopard.

       

      Seems straightforward to have an OnTimer run all the time but how do I encourage it to run at the intervals I would like.

       

      I could use iDoScriptScheduler to run an Applescript that would do what I need, but I thought it might be time to use an OnTimer.


      Stephen

       

      "The computing scientist’s main challenge is not to get confused by the complexities of his own making." — E. W. Dijkstra

        • 1. Re: OnTimer Query
          Mike_Mitchell

          Stephen -

           

          Open a separate window inside the FileMaker client. Have it execute this script step (example):

           

               Install OnTimer Script [ "{name of script}" ; Interval: 600 ] (where the interval is in seconds)

           

          See also:

           

               http://www.filemaker.com/12help/html/scripts_ref1.36.16.html#1044171

           

          HTH

           

          Mike

          1 of 1 people found this helpful
          • 2. Re: OnTimer Query
            LyndsayHowarth

            I would expect the following sequence of events:

             

            The script runs every 10 minutes (ie. 60*10 = 600 seconds)

            It exits if the time is before 6am or after 6 pm or if the day is Saturday or Sunday.

            It sets the webviewer to refresh or go to a new URL (whicherver is appropriate)

             

            - Lyndsay

            1 of 1 people found this helpful
            • 3. Re: OnTimer Query
              Malcolm

              I have a script that uses a webviewer to download a file from the backend of a client website - hence I can not run server-side.

               

              FMS 12 allows "insert from URL", which gives you the opportunity to run this server side.

               

              If you are on FMS11 or less then remember that onTimer is linked to the window that activated it. You have to ensure that the window remains open at all times.

               

              Malcolm

              • 4. Re: OnTimer Query
                StephenWonfor

                Hi

                 

                Thanks Mike for the info and Lyndsay for the control exit.  Malcolm, the problem I have is that when I execute my call to the url it simply downloads a file - near as I can tell Server has no idea where to put it.

                 

                Stephen

                 

                "The key to performance is elegance, not battalions of special cases." -- — Jon Bentley and Doug McIlroy