3 Replies Latest reply on Jun 14, 2013 8:54 AM by ninja

    Script functions during power outage


      Script functions during power outage



           I was wondering what the best way to be preventing scripts half running if there is a power outage - running FM server and pro adv on macs. No UPS hardware as yet but wanted to see what other users are doing to prevent complicated and lengthy scripts from not running completely..


        • 1. Re: Script functions during power outage

               I don't know of a computer that detects a power outage.  Notebooks, switch to battery then when battery power is low it supenses the programs and shuts down.    As far I know most people use a UPS, and when I outage is detect by the user the user shutdown the computer after the current process is finished.   Some UPS software can shutdown the computer when UPS battery get lows, similar to a notebook computer. Most UPS have at least a 10 mintue standby time. 

               The best options is to make complete backups of your computer at least once a month and daily backups of your application.  I don't know many scripts that take that long to run, with the speed of computers these days, but I would make a backup before I ran such a large script. You could make the backup part of the script.

          • 2. Re: Script functions during power outage

                 Good idea... Will implement that!

            • 3. Re: Script functions during power outage

                   Build a set of "If's" into the script and eat the elephant one bite at a time

                   Define a non-global field on a separate table just for the reptitive script

                   Break your lengthy script into bite sized chunks (functional tasks) and end each section with SetField( the field ; "task log complete")

                   The next section starts with If (thefield = "task log complete")   and ends with SetField( the field ; "hourly wage complete") and on and on.

                   In this way, even if the script is interrupted, it can pick up where it left off when it runs next time.