8 Replies Latest reply on May 4, 2009 11:50 AM by user21370

    Run scheduled scripts

    user21370

      Title

      Run scheduled scripts

      Your post

       

      I'mthinkingoftouseascriptthathastoruneveryday. Myfirstthougtwastomakeadatabasestartscript. Butwearenotatofficeeverday.

      IsitpossibletoletFilemakerServerAdvancedrunscheduledscriptsonit'sown? Oristhereanothersollution?

       

       

      Thanksinadvance!

        • 1. Re: Run scheduled scripts
          mrvodka
            

          Depends what you are trying to do with the script. Starting with FMS9 and enhanced in FMS10, you can run these server-side scripts, however some steps are not supported. So again, it depends on what you are trying to do wtih it.

           

          • 2. Re: Run scheduled scripts
            user21370
              

            Oke that's good news. I never heard before of server-side scripts. The script has to check on a date field and if the date field is older than today it must make a new record and fill the fields. 

            Can you tell me where I can define these side-server scripts?

             

            Thanks! 

            • 3. Re: Run scheduled scripts
              mrvodka
                

              You create the script in FMPro ( I still dont know what version you are using, but you can make sure to check the web compatability in 9 in your script maker or there is a new server compatible checkbox in FM10 ).

               

              Then in your Server admin console, under Schedules, create a new schedule --> Run a script.

              • 4. Re: Run scheduled scripts
                user21370
                   Sorry we are running 10. Oke I didn't know that's the way to do it. I've searched the help from a to z but did not see it. Thank you!
                • 5. Re: Run scheduled scripts
                  philmodjunk
                    

                  Good luck getting this to work. Server side scripts are unfortunately limited in their capabilities. Even when the script editor tells you that the script step is server compatible, it may not work as you expect.

                   

                  Import Records and Export Records, for example are two script steps that are extremely limited in what they can do as part of a server side script.

                  • 6. Re: Run scheduled scripts
                    user21370
                       Good to know. I'll build the script step by step and i'll see what does or doesn't work. Thanks
                    • 7. Re: Run scheduled scripts
                      philmodjunk
                        

                      The knowledge base has good info.

                       

                      I've also found it useful to add a global text field to my DB and then have the scheduled script add text to this field a key points during the script's execution. I use that to trace back where a problem took place.

                       

                      Also be aware that any script set to run when the file is opened or closed will also perform when your scheduled script executes.

                       

                      You can put

                       

                      If [Get(UserName) = "Your Schedule's Name"]

                        Exit Script[]

                      End If

                       

                      at the beginning of such scripts to keep them from executing during your scheduled script run.

                      • 8. Re: Run scheduled scripts
                        user21370
                           Thank you very much that's useful info! great!