Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scheduled export from FMS7

Featured Replies

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... tongue.gif

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.

You can use Windows Task Scheduler to auto-open an FM file which runs your script upon open.

  • Author

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.

Make sure you close the file from FMS before opening with FMP!

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.

  • 2 months later...

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

anyone?

thanks smile.gif

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.