11 Replies Latest reply on Aug 8, 2016 4:48 AM by CICT

    FM Server batch file schedule

    malachydevlin

      Hi,

      I have a 1 line bat file (windows 2012 server v14).

      Its just xcopy all backup files to a network drive.

      This works perfectly when you simply click it but the schedule on FM server fails with.

       

      2016-08-08 10:21:50.698 +0100  Error  692  GunShopPro Server

      Schedule "GunShopPro -  Transfer(P Drive)" aborted; system script "transfer.bat" returned non-zero status 4.

       

      I have tried running it with different user accounts and the file has full privileges.

       

      mystery..?

       

      any help would be appreciated..

        • 1. Re: FM Server batch file schedule
          malachydevlin

          ps windows task scheduler runs the task perfectly but notifications isn't great and id prefer to keep all in FM server.

          • 2. Re: FM Server batch file schedule
            CICT

            We came across something like this recently when using batch files to backup to AWS S3. FileMaker Server 14 and FileMaker Server 15 behave differently. Running the batch file within FMS14 server script the only way we could get this to work was to change the user name within the script to the computer administrator account in the format administrator@workgroupname (assuming you do not have Active Directory enabled on the FMS server) using the computer admin password.

             

            All other options failed, such as .\ or workgroupname\administrator, etc.

             

            Interestingly the very same batch file would run in FMS 15 leaving the user name as the fmsadmin default account.

             

            This may not be the same problem as you have and you haven't mentioned which version of FMS you're using, but our batch file ran perfectly within Windows, but not with an FMS v14 scheduled script until we finalised on the above configuration.

             

            Hope this helps

             

            Andy

            1 of 1 people found this helpful
            • 3. Re: FM Server batch file schedule
              CICT

              Sorry, just saw your v14 in your original post, therefore do please try the above.

               

              Andy

              • 4. Re: FM Server batch file schedule
                malachydevlin

                thanks Andy, yes this is my exact problem. Its getting very close however my FM server is connected to a domain controller (not a workgroup), so in the format you mention I can't see how I can select the LOCAL admin account on the pc, the administrator@domain.local is giving me an invalid account error, its a better error than the last though..

                • 5. Re: FM Server batch file schedule
                  CICT

                  OK, the first thing I'd try is the standard Domain entry of DomainName\Administrator - usually don't have any suffix after the domain name, e.g. for compname.local enter compname\Administrator

                   

                  Kind regards

                  Andy

                  • 6. Re: FM Server batch file schedule
                    CICT

                    Also try administrator@domain without the '.local'

                    • 7. Re: FM Server batch file schedule
                      malachydevlin

                      gonna have to give up, no variation will work, not even changing the service logon within windows, so as a last ditch effort I am downloading the most recent server update 14.04 to see if that helps. I shall report back.

                      • 8. Re: FM Server batch file schedule
                        CICT

                        Sorry, I wish I had an AD server to test on, but currently don't enable this on our FMS servers, only our RemoteApp servers.

                         

                        Initially we did play around with privileges within Windows, but this had no effect.

                         

                        Are you using a mapped drive or UNC path in your .bat file? I've seen problems where a mapped drive fails but the UNC path works. Perhaps the above is a red herring? We were using the AWS CLI, so not a like for like comparison.

                         

                        Good luck and I'll let you know if I have any other ideas.

                         

                        Andy

                        • 9. Re: FM Server batch file schedule
                          wimdecorte

                          Or change the "log on as" in the Windows control panel for FMS to an AD service account that has the rights to the network share.

                           

                          By default FMS runs as "local system' and does not have rights to anything but the machine.

                          1 of 1 people found this helpful
                          • 10. Re: FM Server batch file schedule
                            malachydevlin

                            Andy you're a star! thats what it was..

                            It didn't like the Mapped drive!!

                            changed to the UNC and away she went! didn't even have to enter any logon details..

                             

                            Thank you so much!

                            • 11. Re: FM Server batch file schedule
                              CICT

                              I'm glad you're there.

                               

                              Well done.

                               

                              Andy