Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scheduled script doesn't appear to be running

Featured Replies

I am working my way through the FileMaker training series, and I can't seem to get a .sh script to execute on a schedule.

It runs just fine when I run it from the terminal, manually, but when I select it to be scheduled, it doesn't appear to run, even though it sends an email saying it was run successfully.

I have given my .sh file executable permission, and the first line in my file says #!/bin/sh.

Any idea what I could be doing wrong?

Thanks..

You could try setting permissions so the script is owned by "fmserver" and is in group "fmsadmin."

  • Author

Could you tell me how I would do this?

Get Info in the Finder and show the Details under Ownership & Permissions.

  • Author

I can view "Sharing & Permissions" under the Get Info, which lists the users and the privileges of each of the users, but I don't see a way to assign the file to a group and to change its ownership. How do I do that?

  • Author

All of my triangles are pointing down, there's nothing else to view on the Get Info screen. I'm attaching a screen shot.

Screen010.jpg

The advice you were given is for 10.4 -- things are slightly different in 10.5.

In 10.5, click the + button at the bottom and add a new group to the file -- you should see fmsadmin as a group choice. then, give read & write permission to it. close the get info window, and re-opent it to check that the changes "stuck" (sometimes they don't, I think it's a mac os bug)

  • Author

I don't see an fsadmin group/user - I just see "Administrators" and then myself in the list!

I gave the Administrators group read/write permission, to see if that would help, but the script still doesn't run.

Are you making these changes on the machine which has FMServer installed? If not, that may be why the group is missing?

Try this from the terminal:


 id -p fmserver





it should list something like 



uid fmserver

groups fmsadmin daemon





You might be able to use the command line tool chown, as in



sudo chown :fmsadmin myFileName.sh

  • Author

The id tool returned what you said. I do have FileMaker Server installed on the machine where the script is located. I did the chmod command exactly as you have shown, and then tried to run the script through FileMaker Server and it still didn't work.

Although I did notice that fmsadmin was now added as one with permissions to read/write on the file, after I did the chmod.

Replace your script with a simple one such as


#!/bin/sh

echo "### Filemaker Shell Script Running!"

And see if this runs.

You can see the output in /Library/FileMaker Server/Logs/stdout

If this works, then test it with your script and see what the problem is. Put in lots of echo commands if you need so you can see where the script fails.

Edited by Guest
typo on line 1

  • Author

Okay, the last thing that I did, chown, I did on the wrong file (woops!!!). When I did it on the right file, and then ran the script in FileMaker Server, it WORKED.

Thank you everyone for your help.

Glad you got it sorted out. Thanks for jumping in, xochi, I learned something too!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.