When i tried to Automate the script through scheduler its showing an error as filemaker script error.
What is the error?
What does the script do?
What account is running the script?
Please provide detailed information for troubleshooting assistance.
The error is
Thu Aug 10 10:30:00 PDT 2017 Server Events Information Schedule "Test" aborted; aborted by user.
Thu Aug 10 10:30:00 PDT 2017 Server Events Information Schedule "Test" scheduled for 08/10/2017 10:45 AM.
Thu Aug 10 10:30:00 PDT 2017 Server Events Information Schedule "Test" has started system script "dcw_file_move.bat" with process ID 6624.
Thu Aug 10 10:30:00 PDT 2017 Server Events Information Schedule "Test" running.
Thu Aug 10 10:30:00 PDT 2017 Server Events Information Schedule "Test" has started FileMaker script "demo4".
The script should import the data into filemaker and move the files from one folder to another.
It is running in Admin account.
Server side imports have very strict limitations on locations to/from export/import and file types. They can't even import/export from/to FileMaker type files, only certain other file types.
what is the solution or this?
First, read this knowledge base article: Import/Export script on FileMaker Server | FileMaker
Then adjust your script to work within those limitations or run the script from a client instead of the server. One method to run things on a schedule from a client is to use a scheduling tool such as WIndows Scheduled Tasks to open/run a FileMaker "robot file". This is a file with the needed permissions and a script set to run "onFirstWIndowOpen" to perform the script on the server, but now from the context of a client instead of the server.
Add the exit script with a zero as below. It is how I got my server script to work. See pic.
We performed the above solution but it seems still we are not able to run the script automatically.
May I see your script?
Send Event is not a server-compatible script step so it will never run steps 1 and 9.
If you want to combine OS-level scripts and FM scripts then you can use the "script sequence" schedule type. That one allows you to specify an OS-level script before and/or after running a FM script.
while scheduling jobs in scheduler i have selected script sequence but still i am not able to run the schedule properly.
Did you take out the not-compatible script steps?
Do you explicitly exit the batch file with a 0-status to make sure the FM script runs? Any non-0 exit status for the batch file will prevent the FM script from running. It's how you have control over whether the FM script should or should not run depending on what the batch file does.
Are you adverse to doing a little Java coding? Using FMP's free JDBC driver, and considering you have FMS, it's simple to connect and do what you need.
You could then schedule that code to run automatically anytime you need.
Running external programs, like batch files, is a simple line liner in Java, too:
Runtime.getRuntime().exec("server.bat"); // or some minor variation of this
can we invoke this java script in filemaker or not?
vmazum wrote: can we invoke this java script in filemaker or not?
There really is no need to make a round trip to Java to have either FMP or FMS execute a batch file. But first we need some clarity (see other thread too).
Do you want to execute something in FMP on a client, or in FMS on a schedule?
This other thread?
Re: Integrate batch script with filemaker script through a scheduler in filemaker pro
Two different languages.
Two different companies.
But, no, you cannot directly use Java in FileMaker.
So, to use Java in FMP, you use a plug-in or make external calls as I've mentioned.
(Note: JDBC will allow a Java program access to FMP externally, but that's not "using Java in FMP".)
we want our batch script and FM script should automate together with scheduler.
Retrieving data ...