8 Replies Latest reply on Mar 31, 2014 2:00 PM by philmodjunk

    How to stop an "Install OnTimer Script" from repeating?

    janslort

      Title

      How to stop an "Install OnTimer Script" from repeating?

      Your post

           I'm on a PC windows 7,running FMP13 Adv.  I have an OnTimer Script running that is set for 600 seconds.  It does what I want it to do, but the method for stopping it from repeating is supposed to be to install another On Timer Script without naming a script or the interval following the initial scipt.  That's NOT working.  Any help on this?

      Install_On_Timer_script.png

        • 1. Re: How to stop an "Install OnTimer Script" from repeating?
          janslort

               See the screen shot for the script that does NOT work

          • 2. Re: How to stop an "Install OnTimer Script" from repeating?
            philmodjunk

                 The script should work and I frequently use this method to halt the current timer.

                 Do you have more than one window open? Each window can have its own timer.

            • 3. Re: How to stop an "Install OnTimer Script" from repeating?
              janslort

                   Hi Phil:

                   I have many screens and files open.  Is this a possible bug?

              • 4. Re: How to stop an "Install OnTimer Script" from repeating?
                janslort

                     Phil:

                      

                     I just tried it again.  If I enable both script steps, it doesn't run at all.  If I disable the second (stop) it keeps repeating.

                      

                     Jan

                • 5. Re: How to stop an "Install OnTimer Script" from repeating?
                  Markus Schneider

                       I'm not sure what You want... why this timer after importing records?

                       - The first step activates the timer

                       - The second step clears the timer

                       To stop a timer that ist running, just define another timer (without script/interval) - it will stop the existin one. There is only one timer running - per window (use a second script to stop the timer). You can also close the window in that the timer was started - it will stop that timer as well.

                        

                  • 6. Re: How to stop an "Install OnTimer Script" from repeating?
                    Markus Schneider

                         hmm... since we're in the 'FileMaker Server'-section...

                         -> a server script can't be activated using an 'on timer'-script-step. You have to create a script in a FileMaker file hosted on the server, then create a schedule that runs this script

                         The server will execute the script in an intervall defined in the schedule. But You need a FM Server running..

                    • 7. Re: How to stop an "Install OnTimer Script" from repeating?
                      janslort

                           Marcus:

                           Thanks for the response.  The Import is to populate a few very important fields from a USB stick, where the information needs to reside.  I only want it exposed to the possibility of hacking for the 10 minutes it should take my user to use it, then I want to ex[port it back to the USB stick and taken out of the machine.  The OnTimer script step is helpful to keep my user from forgetting it and leaving it exposed needlessly.  The problem is that it isn't working as written, what could I have wrong?

                      • 8. Re: How to stop an "Install OnTimer Script" from repeating?
                        philmodjunk

                             BTW, this post is in the FileMaker Server Forum instead of The FM PRO Forum. So it doesn't get seen nearly as often nor by nearly as many people as it would if posted in the correct area.

                             I would look for something else performing your script when you don't expect it to. as I see no way that install onTimerScript could be the culprit here for just this one script. But then we can't see the "Protect Data" script so we don't know what it does either. If Protect Data includes a Perform Script that performs the Restore Data script, then you have set up an infinite loop where each script infinitely calls the other script.

                             That said, I suggest a script that avoids install OnTimer alltogether:

                             Use Allow User Abort to keep the user from cancelling this script.

                             Then, instead of using Install OnTimerScript, just use Pause/Resume Script to pause this script for a specified, brief period of time.

                             If the pause causes problems, you can fix the original method by putting the "halt the timer" script step at the end of the script performed by this Install OnTimer Script step. So script A sets the timer going and performs script B when the timer runs down. Script B then halts the timer so that it is not peformed a second time.