Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5144 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a Filemaker client/robot machine which in the past we've automated using Lingon, shell scripts, and Filemaker opener files.

I'm trying to replace this with a simple local Filemaker file ("Automation") using ScriptMaster and a series of scripts internal to "Automation" which then call scripts in other files (originally I thought I could just call scripts in other files directly but have found that to be unreliable).

Note that because "Call Script At Scheduled Time" calls at a Scheduled *Date* and Time, I need to re-setup my series of script calls every day by running through the table.

But I'm wondering the following:

1) How do a clear a scheduled script? Is it cleared if I quit Filemaker completely? Is it cleared if I close the Filemaker file that called the "Call Script At Scheduled Time" function? Is there a way to clear it without doing either of these?

2) If I run "Call Script At Scheduled Time" for the same file-script-datetime combination more than once, what is the resulting behavior? Does it just get overwritten, or is the script queued twice in quick succession?

Thanks!

Mark Baum

UCSF Dept of Anesthesia

Automation.png

Posted

Here's something else odd... It seems as though the wrong scripts are being called.

I added a test script to my series of scripts to be called at 10:13 this morning. A script was called at 10:13, but it was a different one from the one I specified.

I saw the same behavior earlier this morning but wasn't certain that this was happening.

If the name of the file is the same as the name of a table in the file, can that cause problems? I'm just guessing here - I can't see what else would cause things to be scrambled in this way *unless* maybe my scheduled scripts aren't cleared when I quit Filemaker, and the fact that I keep scheduling the same scripts over and over while testing might be causing some chaos.

Any other ideas? I'm very confident that I'm scheduling each script at a given time - that the confusion isn't that basic.

Thanks!

Posted

I think I figured out the scrambled script call issue. I don't think ScriptMaster likes to call a script when then calls the "Call At Scheduled Time" function, even if that script is scheduled for tomorrow.

This is just a guess on my part, but it seems the likeliest explanation from the testing I've done. If anyone can confirm or challenge this, please do...

If it's true, I'll probably need to use an externally scheduled shell script to close and restart the FIlemaker file each day after midnight in order to re-schedule the new day's ScriptMaster calls. Not ideal, but I wanted to close everything once a day anyway, so it could work out fine.

Posted

Hmm... At this point, what I'm seeing is if I schedule:

Script 1 for "11/3/2010 5:00 PM"

Script 2 for "11/3/2010 5:02 PM"

Script 3 for "11/3/2010 5:04 PM"

Then scripts do fire at each of those time points, but each time Script 3 one runs, instead of 1, then 2, then 3.

When I reversed the order, script 1 ran three times.

It seems like the final script scheduled is somehow overwriting all three.

This is getting a little frustrating... Maybe I'll back to plists and Lingon, even though Lingon has been discontinued...

Posted

I see that this has received a few views... Has anyone else used this function? How about for scheduling different FIlemaker scripts at different times on the same day? If so, have you encountered the same issue that I have?

I'd love to discover that this is some minor problem with syntax or something else that I'm not quite understanding...

Thanks!

Posted

OK... I was able to get this to work properly using the "Run Script" button in the ScriptMaster file.

So then I had a look at that script and decided to use "Evaluate Groovy" for the function instead registering it.

And guess what... it worked!

So either I'm missing a step in the registration process or else there's an issue with how the "scriptToRun" parameter is being passed for the registered version of the function. The "scheduleTime" parameter is being passed just fine.

I'll have a look at the instructions for registering functions. Maybe there's a jar file I'm supposed to load or something...

Posted (edited)

Here's an updated screenshot of the simple interface I put together for managing the automated Filemaker scripts for this client/robot machine.

Automation.png

Edited by Guest
Posted

This issue isn't something that I've been able to reproduce, so there may have been a problem with one of your parameters at some point.

I do know of one limitation of this module, however, which is that the time in the future to call the function is stored in an int variable as a number of seconds from the current time. If your date is far enough in the future you will exceed the number of seconds which an int variable can store, and it will go past the 2,147,483,647 which an int can store and start back counting up from -2,147,483,647.

Posted

The problem isn't with the times - they are firing just fine. It's with the registered function causing a single script to be fired even when a series of scripts has been specified.

I've got my solution working fine with the evaluate_groovy function after specifying the various parameters with "SMSetVariable". It's only when I do register_groovy and then use the function "CallScriptAtScheduledTime" that the problem appears.

I'm attaching 2 PDFs of my scripts (2 more to follow...) to illustrate what I'm doing. It's simple enough that it should be straightforward to follow. As you said, the question is whether I'm doing something wrong with the parameters for "CallScriptAtScheduledTime" or whether I've run into some kind of bug.

My previous postings show the table with the script names that are being plugged into the function. They are all very similar to the sample script I'm posting ("Perform Schedule Auto Client Daily").

I'd really appreciate your giving this a quick look through.

Thanks!

Startup_Script.pdf

Set_Up_Automation_Script.pdf

This topic is 5144 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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