You can make a filemaker file that has a script that runs on open to call the necessary scripts (do the backup... save a copy... anything else) and then closes itself, leaving the rest of the solution up and running.
Then you can use the OS's scheduled tasks to open that file whenever you want.
1 of 1 people found this helpful
Alternatively you can use FM's ActiveX interface to write an OS script to close all files and quit FM. And do the reverse when done. All triggered by the Windows Task Scheduler
But don't use TASKKILL, it's more than brutal, it is very likely going to corrupt your files in the long run.
>Any ideas? This should be a problem that everyone gets who is running FileMaker in a Peer-To-Peer network.
Yes, and it's one reason to use FM Server.
>Saving a copy from inside FileMaker means scheduling a script to run every night. But how? OnTimerScript doesn't really help here.
Why not? If the file is closed, you can't (but then you don't have to TASKKILL either). If the file is regularly opened and closed, you can Save a Copy As on open (and/or close).
You can also schedule a script to run at a specific time using Install OnTimer. So, as an opening script, run Install OnTimer to run your Backup script. Calculate how many seconds "middle of the night" is from opening using Get ( CurrentTimestamp) and use that number.
Though does it make a difference if it's middle of the night? I assume no one is using the hosted file at any time (not a great idea if they are). Most Peer-to-peer shared files are pretty light. A 100 MB file backing itself up shouldn't slow down client users for more than a few seconds. Backup 4 times a day or hourly. It probably won't matter.
I've done it that way (a new, empty database with just a startup script that runs scripts in all other databases) and it works like a charm
It first sounded a bit like a "tinker solution" but it proofed to be easy, clean and effective!