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

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

Recommended Posts

Posted

I have an Applescript Script application set to run as a scheduled OS Script. It's not working and I'm wondering why?

I receive a confirmation email from the Server saying the script has completed running:


FileMaker Server 9.0.3.325 on FMPSERVER reported the following event:



2008-05-13 17:07:00.311 -0500	Information	150	SXFMP	Schedule "FMP Backup Archiving" completed.

But it didn't run. The script application runs fine if I launch it in the Finder, but no matter what I've tried, it does not execute when the FileMaker Server says it did.

Any thoughts or ideas what could be wrong?

Posted

Essentially, despite the documentation to the contrary, it does not work. A shell script will work, and perhaps the shell script can trigger the apple script.

That apple script probably has to be congurged as an application as well.

I have invited FMI's attention to this issue.

Steven

Posted

;) That's unfortunate. FileMaker Server does let you choose either a plain Applescript "script" document or an Applescript "application" when selecting the OS script. I've tried both and neither actually execute.

This is especially disappointing since the documentation says it should work, and I can't imagine that it would be very difficult to implement since it just needs to make an application run.

I guess there's no point in trying to embed the Applescript into a ScriptMaker script because the perform applescript command is not web-compatible, and from what I understand, script steps must be web-compatible to run as a scheduled server script.

So looks like I'll need to learn how to use the 'osascript' shell command next...

BTW- Thanks for the response Steven!

Posted (edited)

;) Hmm. What gives here?

I created a shell script that triggers my applescript. That was fairly easy to do.

I just needed to create a plain text file, named with a *.sh extension. The only contents are the shell commmand "osascript" followed by the unix path to the applescript application I want to run. And the final step was to make the shell script executable using the chmod +x command.

I set it to trigger via FMP Servers schedule OS Script step, and the server emails me saying it completed, but yet again [color:red]the script did not run!

Even though when I manually run my shell script, it does trigger the Applescript!

So at this point it looks like FMP Server is not actually running my shell script either!

Not sure what's going on here. I'm going to try and shutdown and reboot my server now to see if that has an affect.

Edited by Guest
Posted

Rebooting has had no effect.

So at this point, even though FileMaker Server is sending me email confirmations that my scheduled scripts are running, they are not!

Neither the Applescript nor pure bash shell scripts are running when FMP Server says they are.

And yes, I know these scripts work, because they execute properly when I run them from either the Finder or the Terminal.

What gives?!? Can anyone confirm whether they actually have scheduled scripts that function properly in the current version of FMP Advanced Server (9.0.3.325) under Mac OS X 10.4.11?

And if so, what could be wrong with my setup?

Posted

Thanks, Steven, but I did do that (as I tried to explain in my original post). And I've tried all the possible variations on that: script, application, script bundle, application bundle (FMP ignores the latter two when selecting System-Level Scripts). All of my scripts had standard run handlers.

But, something must be wrong, because today I created a couple bash shell scripts. First I tried one that ran my applescript (from above) using the 'osascript' command. Then I created a simple shell script that just copies a file using a 'cp' command.

Both bash scripts run just fine when manually run from Terminal (by entering their pathnames), but will not do anything when scheduled in FMP. [color:red]EVEN THOUGH FMP SERVER SENDS ME AN EMAIL CONFIRMING THAT IT COMPLETED SUCCESSFULLY

I've tried restarting & rebooting my FMP Server, with no change in the behavior.

I am running FMP Adv. Server 9.0.3.325 on a G5 iMac running OS X 10.4.11.

My scheduled backups are functioning properly, but for the life of me I cannot get a scheduled script to actually work despite the confirmations from the server. I've checked the FMP logs and see no sign of error. It's as if FMP just skips the actual part of running the scripts and does everything else! Very annoying.

Posted

Thanks, Steven.

Did you actually confirm that it doesn't work on your setup?

If so, I'm surprised no one else has noticed this before me...

In the mean time--until FileMaker can get scheduling fixed--I'm using CronniX to automatically perform my scripts. Works great!

Posted

Apple Scripts and Apple Script applets cannot be triggered directly by the Scheduler. Neither can VB Scripts on Windows. I will be discussing this with them

Steven

Posted

I said:

Apple Scripts and Apple Script applets cannot be triggered directly by the Scheduler. Neither can VB Scripts on Windows. I will be discussing this with them

And that apparently is going to be the definitive word on this issue. Despite what the documentation says, AppleScripts and VB Scripts cannot be run directly from the Server Script Scheduler. Please use batch sctripts and shell scripts instead.

Steven

Posted

Are we sure that shell script even work? I tried that as well and got the same result as when I tried applescripts. It sends an email saying it completed, but the shell script was never actually run. So based on my experience, no scheduled scripts work at all with FMP Server 9.

Posted

Hmm. I am unable to corroborate that.

I created a bash script. Just a one-liner that uses the osascript command. I set the permissions using chmod 777. It executes fine when I run it from a terminal window. But it does not run when FileMaker's OS Script Schedule is triggered. Despite the fact that the Server does send me a success email:

FileMaker Server 9.0.3.325 on SXFMP reported the following event:



2008-06-04 12:35:00.189 -0500	Information	150	SXFMP	Schedule "Test" completed.

So, not sure what is wrong, but I'm sticking with CronniX because FMP's Script Schedules just don't work (at least for me) at all.

This topic is 6015 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.