4 Replies Latest reply on Apr 19, 2016 11:34 AM by DavidJondreau

    Server Scheduled Script

    ninja

      My first time setting up a Server Scheduled Script and I think I'm missing something simple, but banging my head against it all day.

       

      Each day, I want the server to launch a script from within a hosted dbase.

      The script checks what day it is, and if Day(Get(CurrentDate) = 1) it purges itself and imports records from another hosted dbase.

      Well, it's supposed to...

       

      All is working except the import...it won't import anything.

      Error code 100 on every import step "File is missing"

      If I open the receiver dbase as a client and manually run the script, it works perfectly.

      If I get on the FMserver13 admin console (via Chrome) all of the imports fail with code 100.

       

      Is it External Data Source Syntax?  file:sourceDabse , file:sourceDabse.fp12 , fmnet/{IPaddress}/sourceDbase...all fail

      I've tried opening the file with a script step...without it I get error #3 on the first import then 100 for all following

       

      What am I missing that I can run the script as a client without issue, but not schedule it or even "Run Schedule now" and have it run correctly?

       

      No globals, both dbases are on the same server with the same IP address (different dbase names, of course).  Surely it's something simple, but I'm going blind on it...

       

      Thanks for your help and advice!

        • 1. Re: Server Scheduled Script
          clind

          From the help file on the 'Import Records' script step:


          When using the Import Records script step or Export Records script step in a FileMaker Server scheduled script, keep the following in mind:

          Any specified file must be in the FileMaker Server Documents folder, the temporary folder, or a child folder of either the FileMaker Server Documents folder or the temporary folder. For example, the following are all valid paths for file.csv:

          <Documents>/file.csv

          <Temporary Path>/file.csv

          <Documents>/Folder1/file.csv

          <Temporary Path>/Folder1/Folder2/Folder3/Folder4/file.csv

          Any path specified that isn’t a complete path to the file (for example, anything other than

          /Library/FileMaker Server/Data/Documents/<0 or more directories>/<filename> ) is evaluated as being relative to the temporary path.

          Any paths that include “..” are considered invalid.

          • 2. Re: Server Scheduled Script
            ch0c0halic

            From the FMI knowledge base article # 7035

            "Import/Export script on FileMaker Server"

            Import/Export script on FileMaker Server | FileMaker

             

            Importing/exporting directly to and from another FileMaker Pro file is not supported via a FileMaker Server scheduled script. The supported import/export formats include:

            <snip>

             

            This article has the information you need to understand what is going wrong.

            • 3. Re: Server Scheduled Script
              ninja

              Thanks Chocohalic

               

              From the KBA:

              Importing/exporting directly to and from another FileMaker Pro file is not supported via a FileMaker Server scheduled script. The supported import/export formats include:

              • Comma- Separated Text format (csv or .txt)
              • FileMaker Pro HTML Table format (.htm) Export only
              • Merge format (.mer)
              • Microsoft Excel format (.xls or .xlsx)
              • Tab-Separated Text format (.tab or .txt)
              • XML format (.xml)
              • dBase files (.dbf)

               

              Wait...WHAT?  I can import and export to other people's stuff, but not to Filemaker?

              I need Microsoft to help Filemaker talk to Filemaker?  That's just plain odd!

               

              Thank you both for steering...

              • 4. Re: Server Scheduled Script
                DavidJondreau

                Export to a csv and import from that.