11 Replies Latest reply on Jul 18, 2011 6:17 AM by Vincent_L

    script step to start stop server from client

    jungovox

      Title

      script step to start stop server from client

      Your post

      windows xp / win 2003 server / fm11a and fms11a

      is there a way I can stop/start fms (close or open all databases) with a script step from a client on the network -

        • 1. Re: script step to start stop server from client
          jungovox

          anyone on this one ?

          • 2. Re: script step to start stop server from client
            philmodjunk

            Already answered this in your other post in FM Pro Forum.

            There is no such script step.

            It's an interesting idea, but I think it would be a challenge to implement as the system, from a client, would have to check to confirm that other clients are not logged on to any files hosted on the server, then close all the files, then stop the server. Since closing all the files disconnects your client, you'd some how have to send both instructions: close the files, then stop the server before the server could execute the close file part.

            Currently, you'd need to use the Server Admin Console for this and it can be accessed remotely so you do not have to be in front of the actual machine to do this.

            • 3. Re: script step to start stop server from client
              jungovox

              thanks for thinking about this - my routine for years has been

              1. fire off a windows command line via a timed task to 'Close all databases'  at say 10pm every night

              cd "c:\program files\filemaker\filemaker server\database server"
              fmsadmin close -y -t1 -u fj -p fj

              2. use a windows line command to copy back specific files to a local pc -

              3. Process on that local pc for about 1 hour. hundreds of fm scripts ...

              at the end of the nightly process scripts I run a FM script steps that close all open files and the fires off windows command to copy back the files to the server and then close the filemaker file.

              I was looking for a way from that script to tell fms to open all files.

              so presently I have a timed task on fms to open them at a specific time when I know the updated files will be back there.

              • 4. Re: script step to start stop server from client
                philmodjunk

                Why do you need to perform these tasks on a different computer?

                We run certain basic housekeeping tasks (not all of which can be done from a server schedule, but some must be from a client session), every night without having to copy the files back and forth between two computers.

                • 5. Re: script step to start stop server from client
                  jungovox

                  Why do you need to perform these tasks on a different computer?

                  ** it's faster and some scripts can't run server side. also I do this from years of habbit. , 

                  We run certain basic housekeeping tasks (not all of which can be done from a server schedule, but some must be from a client session), every night without having to copy the files back and forth between two computers.

                  *** a goal for sure - I have hundreds of scripts that write text summaries (export/import) pdfs ect to my my dox folder - but I need to covert much of this to get(documentspath) structures etc.

                  Can I run filemaker client ON the server ?

                  • 6. Re: script step to start stop server from client
                    Vincent_L

                    Yes you can Run a client robot on the server, I do it every day. It's at least 2 times faster than through network. This is how I run all my maintenance scripts. FMS inly use two core, client use only one (sad but true), so on my six core machine (as well as on mys previous 4 cores), this doesn't pauses any problem. Make sure you set the remote through the localhost ip address (127.0.0.1) that's faster.

                    Of course server side is faster, but since FM inc cripples Server side processing so much, we can't use it instead.

                    • 7. Re: script step to start stop server from client
                      philmodjunk

                      Yes, I use two scripts. One uses a FileMaker robot file "run" by windows task scheduler on the server. This file is defined to open itself with an account name and password that matches the hosted file. It is also set to run a two step script: Step one is a Perform Script step that performs a script in the hosted file and step two is quit application so that the robot file and FileMaker Pro close after the script is launched on the server. This script runs as a client session and thus does things difficult to impossible to do via a server schedule launched script.

                      The second script consists of only server compatible tasks so a schedule launches it a bit later than the first script to finish up.

                      • 8. Re: script step to start stop server from client
                        jungovox

                        Thanks Guys -

                        I just installed fms advance client on my server -

                        trouble is

                        1. I can't run the local app ON the files that are OPEN on server (makes sense)

                        2. even if files are closed on server I can't launch those files without filemaker local crying...

                        "filemaker cannot share files because another user is already sharing files using fmp on this computer.

                        So I must STOP fmserver as well... yes ?

                        Although my must do local scripts will run faster on my local machine (blazing new flash drives) - I see some real advantages with runing on server (like being able to send cmd line calls from scripts to fms -

                        I am hoping that the next version of filemaker (overdue) will render ALL script steps as server side compatible.

                        • 9. Re: script step to start stop server from client
                          Vincent_L

                          On the FMA client, don't run it on the local database, but on the server hosted one, using 127.0.0.1 IP address.

                          • 10. Re: script step to start stop server from client
                            jungovox

                            Good tip GT - I have that going - via a dummy file and an opening script - Ideally, I'd like to run my jillions of nightly scripts against ALWAYS open server files - this gets me closer. thank you.

                            • 11. Re: script step to start stop server from client
                              Vincent_L

                              This is what I do daily for 2 years