Are you running on FileMaker Server at all? If so you can schedule a script to run via the Server Admin Console.
Otherwise are you running FileMaker pro 10 client and do you want it to run at a set time when you have the database open? in which case you can run a script at startup and use the Install OnTimer Script and the following calc to cwork out the duration untill the script needs to run
GetAsNumber ( Time ( 18 ; 00 ; 00 ) ) - GetAsNumber ( get ( CurrentTime ) )
This will then run at 6pm but only if the current window is not closed
If neither of these are appropriate then let us know which versions of FileMaker you are running
I hope this helps
Thanks for the quick response, I really appreciate it!
Yes, I'm running FMServer 9 Adv. The export script step is not supported in FMServer 9, so I was thinking of having a script that triggers another script with the export step, but i don't know if that will work...
I am running FMPro 9 and yes I would love for the script to run at a set time... obviously this requires the DB to be open?
-----"This will then run at 6pm but only if the current window is not closed"
Do you mean the script will not run unless the DB is open? Not sure what you meant by that statement.
Thanks for the help!
As I answered on another thread, pause/Resume can be used to pause a script for a specific period of time. If you design the script to calculate the amount of time from the current time to the scheduled time, you can use that value as a parameter in Pause/Resume.
Sorry Josh, that is a new feature in FileMaker Pro 10, so you wont be able to use it for 9.
What you will have to use for FileMaker 9 is either a plug-in, an example is this one by Decons called ScriptFire
Or if your on a Mac you can write an AppleScript to run at a set time every day that will open the database and run the script.
Worth noting that FileMaker Server 10 supports the ability to import and export from a scheduled script.
So the user still needs to manually start the script, and then it pauses/resumes on the desired time?
Could I view the paramters you used to set up your calculation script?
I'll demo that Dacon product and see how it works, thanks!
I'm on windows but I'm not sure if I can create a batch file on the database server that will open and DB and run the script...
What directory are the ScriptMaker scripts stored on the database server?
I like the idea of using the OS to schedule this. Hadn't thought of that one. Josh, you can set file options for your "opener file" to perform a script when it opens. Thus your batch file only has to open the correct file. FMP takes over from there.
WHen I used this technique, it was in an FMP 5.5 db, there are new options, but here goes:
Set field [table::GlobalField, Time( 24, 0, 0)-Get( CurrentTime)+Time( 4, 0, 0)]
If I did it right, this paused the script until 4:00 am.
Ok, so lets say i use a batch file to open the correct DB, which performs a script. Could I run this batch job on the database server without having FMPro installed?
Thanks for the technique, I'll give it a try and post my results!
I am not sure about batch scripts to open files and run scripts on Windows machines, but if you can just get it to open a file you could open a different file that has an On Open script set to run, and that in turn calls the actual script you require in your main file.
Either way you will need to run it on a machine that has got FileMaker Client on, not just server.
No, you would set up the OS of a client machine to open the "opener file". File options on the opener file are set so that a script runs when the file opens. That script performs the desired script in your hosted database file. Since this all takes place as a client session of the hosted database, the various script limitations that you've been banging your head on for a server scheduled script no longer apply.
Hmm so perhaps I could install FMP9 on the database server, then create batch file to open DB, which will run the "On Open" script...
Now, one more question:
Is it possible to set the output file location, of the export script step, to a directory on the database server itself?
If so, do i just set the output path while logged into the database and selecting a location on my db server?