4 Replies Latest reply on Mar 18, 2013 12:33 PM by philmodjunk

    What's the easiest script steps to have my system close at 8:30pm pm?

    jacksrmd

      Title

      What's the easiest script steps to have my system close at 8:30pm pm?

      Post

            I'll have my computer as the host and users in a different state will be clients to my solution.  My clients will be connecting to through the solution through Instant Web Publishing.  Since I will be leaving work at 4:00 pm and my clients may be at work up until 7:00 pm, what script steps would constantly check the current time on my machine and @ 8:30 pm it would close the solution?

           Thanks in Advance.

        • 1. Re: What's the easiest script steps to have my system close at 8:30pm pm?
          philmodjunk

               Out of curiosity, why do you need to close the file at all? Why not just leave it open?

               You can use Install OnTimer Script with a calculation to schedule your close of the database.

               You'd write one simple script, called "Close Database" with this script step:

               Exit Application

               Then you run the following script to schedule an 8:30 pm close of the file:

               Install OnTimerScript ["Close Database" ; Interval: GetAsTime ( "8:30 pm" ) - Get ( CurrentTime ) ]

          • 2. Re: What's the easiest script steps to have my system close at 8:30pm pm?
            jacksrmd

                  Thanks Phil.

                 You've been there for all my questions and issues :)

                 No problem asking why I would want the system to close @ 8:30 pm.  

                 Since it's on my office computer until we get FileMaker Server Advanced, I want it to close because:

                 -  while its being hosted on my machine, I can't save a new compacted version remotely to make enhancements with the latest data - I don't want to do updates with a live version in the event I do something I wish I didnt;

                 -  if there's a power outage overnight or over the weekend, I want to minimize damage to the solution.

                 -  since i will have it set with instant web publishing into we get Server Advanced, I don't want 24hr availability to my solution with spybots, hacking, etc. (I know there's NO fool-proof way, but I'm trying to minimize the possibility as much as possible)

            • 3. Re: What's the easiest script steps to have my system close at 8:30pm pm?
              jacksrmd

                    I've just noticed the Advanced options within Instant Web Publishing to limit specific IP addresses :)

                   I'll get the users' IP addresses info and implement this within my solution.

              • 4. Re: What's the easiest script steps to have my system close at 8:30pm pm?
                philmodjunk

                     -  while its being hosted on my machine, I can't save a new compacted version remotely to make enhancements with the latest data - I don't want to do updates with a live version in the event I do something I wish I didnt;

                     Actually, you can do this. Instead of closing the database, your script can use save a copy as to make that compacted backup copy. A robot file can also do this on a schedule from an OS based task scheduler. The scheduler opens the robot file, file options in the robot file perform a script in your main file that saves a copy of the database file.