Peter Fenner Posted April 22, 2003 Posted April 22, 2003 I want to run a looping filemaker script on the host computer that sends my email and then pauses for 1 hour before sending email again. I also want run a looping script on every computer that sets a global time fied as current time and then pauses for 3 minutes before continuing with loop. Both scripts would need to run permanently. Will this effect overall performance? is this a bad idea? Also, should I rather send my email from a user machine and not the host ? Thanks
andygaunt Posted April 22, 2003 Posted April 22, 2003 Well, you won't be able to do this by running a looping script, because then no user will be able to use the system. Because a loop script will stop any interaction until the script has finished. And it never finishes. To do this, you would for the users need a plugin that can trigger scripts on a time basis. Oazium Events www.wmotion.com Activator www.troi.com ScriptIT www.cnsplug-ins.com As to the script for the host. Best to create a robot machine to run this. This is a machine in the corner that you set with a loop script. This machine is not used by anyone and so can use the loop script as opposed to a plug in. The email. Depends what you are wanting to email? The host is not doing anything but serving the files out. The users are the ones interacting with the data. HTH
Peter Fenner Posted April 22, 2003 Author Posted April 22, 2003 Thanks Andy I always thought this until I was working on a database (single user) and performed a script that I made pause for 1 hour with user abort on. While this was paused I was able to move around the database as freely as before and perform other scripts. Is the circumstance different with a single-user file? If it is different then is this still a bad idea for single user solutions? Peter
cjaeger Posted April 23, 2003 Posted April 23, 2003 Verify you checked the right option for all your other scripts (halt, exit, pause other scripts). It is a bad idea, even in single user mode. There are other possibilities: AppleScript: Write a AppleScript: tell application "FileMaker Pro" tell database 1 do script "getmail" end tell end tell You can either have the loop directly in the AppleSkript, or better, trigger this Skript with cron. Similar wiith windows: WSH lets ypu specify a do script as well. use winat.exe or the builtin scheduling of Win2k. The third alternative: include a "check-checkmail" Filemaker skript in every button of your solution. That is: record the time of last script execution in a global. let every button/script in FM compare this time with the current time. If Status(currenttime)-lastexec > "0:59:59" do script "check email" Of course, you will have to adapt for 12h/24 h time and such. But the basic idea is that -whenever this data is needed, chances are that someone is using the database. So the user triggers the script, basically. This technique is used more often on highly frequented web servers, but it works in FM as well. You can additionally put the database in "sleep mode", performinmg your above looping script overnight, but stopping it at 7am.
Peter Fenner Posted April 23, 2003 Author Posted April 23, 2003 Thanks cjaeger - I will explore your suggestions.
Recommended Posts
This topic is 7889 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