4 Replies Latest reply on Oct 22, 2008 2:16 PM by AndyFrazier_1

    Failing "export" step in script running on server side

    RvH

      Title

      Failing "export" step in script running on server side

      Your post

      When I run a script remotely to gather data and export it to a file (using relative notation file:test.txt), it works as advertised. When I schedule the same script to be run on the server (FMS 9), the scripts aborts. It is definitely the export step in the script because if this step is disabled, the script performs correctly on the server too.

      Amazingly, the script fully works when I run it "remotely" using a copy of FM Pro installed on the same machine as the server.

      Is this perhaps a permission issue ? (The software is installed on a Windows server)

        • 1. Re: Failing "export" step in script running on server side
          AndyFrazier_1
            

          Only web-compatible script steps will work when run by a server schedule - and that leaves out anything that interacts with the local file system, like exporting.

           

          The reason it still works when you open the solution remotely is because you're opening it with the FMP client - which, unlike the FM server, has access to the local file system. 

          • 2. Re: Failing "export" step in script running on server side
            RvH
              

            Thanks for the rapid response.

            I was not aware of that limitation on scripts called from the server schedule. So I have no choice and will to continue to do such "daily housekeeping" using the installed FM client ...

            • 3. Re: Failing "export" step in script running on server side
              rmanook

              Great answer, AndyFrazier!

               

              To expand on that a bit for those viewing, you can check which script steps are web-compatible by going to Scripts > ScriptMaker > New (or edit an existing script).  Down at the bottom left of the Script window, there is a check box for web compatibility.  When you check this box, some script steps will appear gray.  You will not be able to use a grayed out script step over the Web or in a Server side script.

               

              Thanks!

              tsturtle

              FileMaker, Inc. 

              • 4. Re: Failing "export" step in script running on server side
                AndyFrazier_1
                   Well, what I do is set up a machine to run those kinds of things for me. I use the Task Scheduler (in Windows; not sure what the Mac equivalent is) to open the file as a particular user. Then set a startup script that checks for that user (call it "ReportRunner" or something). If it's that user, rather than doing whatever the file normally does, it just goes and runs a bunch of reporting scripts, then quits. I do this on a regular machine, running the FileMaker client...so it can do anything a live user would do. I set this to run at night, so it's off-peak, and heavy reporting has some breathing room without slowing the whole system down.