3 Replies Latest reply on Apr 24, 2017 3:35 AM by wimdecorte

    how to schedule a local FM File script

    sivagurS

      Hi

       

      I have a project where I need to Import a few records from ODBC Data source to my local not hosted Filemaker files.

      This is for the user to work on the data when they are offline.

       

      The user always work with the offline file and I run On Timer scripts to check for network connections and whenever connection available and with user choice, does the necessary syncing from local to Hosted file.

       

      Also to provide user with the most updated data, I run a script to Import records from ODBC to local FM File.

      the Idea is to run this script every morning and send the user a link to the location of this updated file.

      I can get the script to work and save it in the desired location.

       

      But I am stuck at scheduling this script to run daily.

      1. How do I get a script from local FM file to run from Windows Task Scheduler.

      2. I tried Perform Script [Local Script] from another hosted file. It works when I run the script on my own. But when I tried it from FM Server Schedule, it gives me the error 100. [File is missing].

      3.  If both of these are not optimal, what would the ideal approach to get this Import done on a daily basis.

       

      Thank You

      Seetha

        • 1. Re: how to schedule a local FM File script
          Johan Hedman

          If you use FileMaker Server and setup a ESS you can have the ODBC tables inside your solution on FMS and put data using FIleMaker Scripts. You can use FileMaker Scheduler to run a ordinary script that moves data with Set Field in a Loop.

          • 2. Re: how to schedule a local FM File script
            nicolai

            Task scheduler can not trigger a FileMaker script directly. I suggest two options:

             

            1 Write a VBScript which triggers your script and add this script to the scheduler

             

            2 Create a separate FileMaker file with a start up script  running import script in the main file and schedule opening it through the Task Scheduler.

            • 3. Re: how to schedule a local FM File script
              wimdecorte

              sivagurS wrote:

               

              Hi

               

              2. I tried Perform Script [Local Script] from another hosted file. It works when I run the script on my own. But when I tried it from FM Server Schedule, it gives me the error 100. [File is missing].

               

              This one only seems to run because the local file was open at the time.  It is your FileMaker Pro that recognizes that both files are open and that they can reference each other.  An FMS script can not reach out to foreign machines and do things.  If it could it would be a huge security issue.