pacific707 Posted March 21, 2006 Posted March 21, 2006 (edited) 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, 2006 by Guest
xochi Posted March 23, 2006 Posted March 23, 2006 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)
pacific707 Posted March 23, 2006 Author Posted March 23, 2006 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
xochi Posted March 24, 2006 Posted March 24, 2006 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?
pacific707 Posted March 24, 2006 Author Posted March 24, 2006 (edited) 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, 2006 by Guest
xochi Posted March 24, 2006 Posted March 24, 2006 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?
xochi Posted April 5, 2006 Posted April 5, 2006 See this thread which addresses similar issues: http://fmforums.com/forum/showtopic.php?tid/175368/post/200237
Recommended Posts
This topic is 6805 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