March 21, 200619 yr I have a solution that needs regular maintenance scripts to run. I have one that prints records to a calendar and others that update records in other ways. I need these scripts to run over night because some take several minutes or even hours to run. I have FMS8 and have put an applescript (one that just opens a webpage for this test) in the scripts folder to test the Schedules function. When I right click and say run now nothing happens. After leaving it over night it said Disabled and I cant even test it. I am sure I am missing something here can someone clue me into what I am doing wrong? Thanks Edited March 21, 200619 yr by Guest
March 23, 200619 yr FMS8 schedules do not run AppleScripts, they run Shell Scripts. This is a common misconception. It's trivial to have a shell script which performs Applescript command. e.g. #!/bin/sh cd xyz ; open 'MyAppleScript' # this will work if the applescript is saved as an app # a different way, execute Applescript command directly osascript -e 'Tell application "Safari" to quit' (those are from memory, i may have messed up the syntax slightly)
March 23, 200619 yr Author Great thanks I knew there was something I was missing However I have now made a script that i can run from the terminal but the scheduler wont run them. do i need to make it executable from the finder? thanks
March 24, 200619 yr May be a file permissions issue? Make sure the file is in the 'fmsadmin' group. Not sure if it needs to be owned by 'fmserver' too?
March 24, 200619 yr Author group is fmsadmin my file is called test.sh a plain text file made with pico #!/bin/sh open /Library/FileMaker Server/Data/Scripts/AutomationScripts/test.app that is my script i want it to run an applescript app called test.app in a folder i put in the scripts folder. works from the terminal but the schedule says it runs but nothing happens Edited March 24, 200619 yr by Guest
March 24, 200619 yr 1. Check permissions on the enclosing folder? 2. Do you get any output in Console.log or System.log (Mac OS X) or filemaker's Event.log that indicates what the error might be?
April 5, 200619 yr See this thread which addresses similar issues: http://fmforums.com/forum/showtopic.php?tid/175368/post/200237
Create an account or sign in to comment