MattPage Posted March 30, 2005 Posted March 30, 2005 Hi all, I've been searching these forums for some time now and can't seem to find an answer to my question. I need to run a script every night at midnight to export all our data to a CSV file. I have the script working (just a simple export), but I can not work out how to get this to run at midnight. I assumed it was something in the Scheduling in FMS7 but I cant work it out. It wants me to pick a script file, but all the scripts are in the database. Thanks in advance for any help...
dkemme Posted March 30, 2005 Posted March 30, 2005 FMServer cannot run FMPro scripts within the database. In order to do this every midnight you would need to have a client machine run this at midnight or have the server machine close the database, quit FMServer, open database in FMP, run the script, close the database, quit FMP, restart FMServer and start serving the databases again. The second method is not only more difficult but dangerous to do every night as something could go wrong. I also hate to stop/start serving files too often as could invite corruption. I would recommend finding a spare machine that can be left on at night.
MoonShadow Posted March 30, 2005 Posted March 30, 2005 You can use Windows Task Scheduler to auto-open an FM file which runs your script upon open.
MattPage Posted March 31, 2005 Author Posted March 31, 2005 Thanks for the advice. I will try the Task Scheduler method, not exactly ideal and I'm suprised FMS7 doesn't include this type of feature.
dkemme Posted March 31, 2005 Posted March 31, 2005 Make sure you close the file from FMS before opening with FMP!
Ron L Posted April 5, 2005 Posted April 5, 2005 We have had great success setting up a dedicated PC to run our scheduled scripts which download/import data in csv format from the web and upload data in tab format for online reporting. We deploy more than a dozen different processes automatically from this machine. Write your main process(es) in the db's where they need to be. Then install FMP client on the pc you've chosen to be the "slave" and build a simple script which calls your export script on a schedule. We run ours through an endless loop with a pause of 20 minutes. Works like a charm.
spankalee Posted June 7, 2005 Posted June 7, 2005 I have the same issue now. Just got FMS and I nee to run a script to export. I don't want to dedicate a client to do it, because part of the whole reason I got FMS was to automate backups and exports. So what is a script file? is it not a FileMaker script? How do I take a working export script and turn it into a script that FMS can run? Thanks guys
Recommended Posts
This topic is 7109 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now