4 Replies Latest reply on Oct 30, 2013 3:57 PM by bgustin

    Triggering a script at a time of day?

    bgustin

      Is there a way that we can trigger a script on FMP12 machine to run (lets say 11:30pm every night)? I am trying to save PDF reports every night (FMP12 server doesn't allow PDFs on server actived scripts). I have hear that 360works scripttriggers can do this, but was wonder if it can be done without plugins?

       

      If no ideas, does anyone recomend 360works scripttriggers for this application? (I don't know much about it)

        • 1. Re: Triggering a script at a time of day?
          Mike Duncan

          Why not just install an on timer script that runs every minute or so, and checks to see if the time has come to run the script?

          1 of 1 people found this helpful
          • 2. Re: Triggering a script at a time of day?
            DavidJondreau

            If that's running on a user's machine, then every minute, their work gets interrupted to run the timer script.

             

            If you're sure the computer's going to be on and the database running, you can run a script on start up that calculates how many seconds it is from then until 11:30pm and run the script then.

             

            360Works creates great products and this is really a server side script thing to do.

             

            DJ

            • 3. Re: Triggering a script at a time of day?
              bgustin

              I think that might do what I need thanks. I',ve never tried using Install timer script.  I will try it out tomorrow.

              • 4. Re: Triggering a script at a time of day?
                bgustin

                Get Idea Mike, I only want it to run once a day at 11 pm.  I was planning on leaving my computer on all the time, so it could save the reports to my machine.    Plan for it to create the report at 11 pm (82800 seconds) every day.  I am not sure if I have coding right for the 2nd, 3rd........ days?  Could you please review the script steps that I have created, and let me know what you think?

                 

                Set Variable [ $startdate; Value:Get (CurrentDate) ]

                Install OnTimer Script [ "Report Script" ; Interval: If ( $startdate = Get ( CurrentDate ) ; 82800 - Seconds ( Get ( CurrentTime ) ) ; 86400 )