Jump to content
Sign in to follow this  
jeffmcg

schedule a script

Recommended Posts

I have server8 and pro8.5 adv

How do i schedule a script to run a certain time?

Share this post


Link to post
Share on other sites

You can't. There is a scheduling function in the Server Administration Tool (SAT) that indicates that you can run scripts but the scripts that it can run are operating system scripts. AKA batch files. So you could write a script that would copy a bunch of files from one folder to another for instance but you cannot run a Filemaker script.

Share this post


Link to post
Share on other sites

Well, yes, you can trigger a FileMaker script with a .bat script.

Share this post


Link to post
Share on other sites

How do you do that?

Share this post


Link to post
Share on other sites

look here

http://filemaker.com/help/08-Scripts9.html

Share this post


Link to post
Share on other sites

Well yes, but you would need to run a copy of FileMaker Pro on the server...

Share this post


Link to post
Share on other sites

An alternate method, which also requires FileMaker Pro on a client machine, is to put a file on the client machine that runs a startup script. This script calls the desired script in the hosted file, and then closes the client file. You then use an OS scheduler such as Scheduled Tasks on Windows XP or iCal on OSX or a similar tool such as CronniX. Set the schedule to open the client file at your desired info and say hello to your new robot!

Share this post


Link to post
Share on other sites

This guy is a self declared beginner and if he's like me and sees a scheduler that runs scripts on the server he would be wondering how to run his Filemaker scripts from there. We all know that is not really possible.

As you guys described, there are indeed ways to schedule scripts but they are all pretty elaborate, clunky, obscure, or require unexpected resources such as a dedicated PC. When what you have in mind is something as simple as setting the schedule and script name into the server, the methods described can be very discouraging or unachieveable for a beginner.

Bottom line is, yes there are ways but unless you like elaborate duct tape solutions you will likely be disappointed.

Edited by Guest

Share this post


Link to post
Share on other sites

I didn't read 'the guy' (sorry Jeff) wanted to run the script on the server side.

Indeed, doing so is not possible, unfortunately.

As for the 'obscure' side of the Moon... well, scheduling a task is not THAT difficult.

On the mac, iCal and Automator even make it a child's play. A little more tricky on Windows, but Task Scheduler and ActiveX make it quite easy.

Anyway, the question was 'how to do it', I supposed there was a need here, and as I don't know of a built-in feature in FileMaker, I just tried to help 'the guy'.

Edit :) if you have a dedicated client, you can even use a free plug-in such as DoScript 2.0, which allows to schedule scripts from FileMaker. The only thing is that you must be sure that the client machine is on the correct context, that's why a dedicated client is needed.

Edited by Guest

Share this post


Link to post
Share on other sites

Lol Fabrice, you remind me of Matthew Broderick when he wears a beard:

Share this post


Link to post
Share on other sites

F... Matthew Broderick !

I've been hearing this for years, LOL !

Share this post


Link to post
Share on other sites

LOLOLOL!

Share this post


Link to post
Share on other sites

Ok this is what I am trying to do...

I run some fm reports every morning that takes me about an hour because it involves importing a huge file that comes in sometime during the night.

If i could run my import script before i get here it would saver a lot of time.

I leave fmserver running 24/7, I can leave my client fmpro8.5 running all night if i have to.

I actually have the same situation for multiple reports so the time adds up.

Is a plugin the way to go?

Share this post


Link to post
Share on other sites

Using the method I described above, you can do it without a plugin. You can call it duct tape if you want: I like duct tape.

Share this post


Link to post
Share on other sites

Use cronnix which is a Mac scheduler. I have same situation as urs and I use it.Its a free software.

Share this post


Link to post
Share on other sites

I couldn't use cronnix because i have windows, but i did find that doscript2.0 works fine for me.

Edited by Guest

Share this post


Link to post
Share on other sites

On a Windows system you have a 2-step solution:

1. Create an "opener file" - that is, a new, blank Filemaker file and create a new script that opens the import script in question in the other file. You will need to add a file reference to do this. Choose File...File Options and under When Opening this File check Perform Script. Select the 'Opener Script' you just made.

When this file is opened, it triggers the script in the other file to import. That leads us to Step 2 - Scheduling

2. In Windows, Click Start..Control Panel...Scheduled Tasks...Add a New Task

When it asks you for the Program you want to run, click Browse and Select the Filemaker file you just created. Set your schedule and it should work.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

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