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.

Featured Replies

Greets, all:

A simple question yet I can't seem to find a definitive answer: I want to have a script automatically run (in a hosted file on FM Server 18) on the last day of every semester that will create a report (which will be further scripted to be sent by e-mail to multiple users). What do I need to code/set up so the script will run autonomously?

TIA for your replies!

If semesters end on the same day each year you can probably setup different scheduled scripts for each semester and repeat these schedules every year.

Alternatively, if there's no rhyme or reason to the ending of semesters, create a schedule that runs every day (or if semesters always ends on a Friday, run it every Friday), and then use a table to manually register the end of semesters. Then execute the script if the current date matches a date in the table.

  • Author

Yes, that's later on, but how do I intitiate the auto-run of the script? Does Perform on Server automatically track the date/time while the file is sitting idle on FM Server?

You initiate the run of a script in the scheduler on the server. You specify a date and time when to run a script. You can run a script once or repeat it every day, every hour, etc.

In the script you can then check the current date and time to determine whether it's a last semester day. 

I'm not sure I understand your question about PSOS. A PSOS script is triggered from a client. Not from the server. You can't run the PSOS script command on the server. 

https://www.youtube.com/watch?v=94HVrQblPcc

DB Services shows different ways to generate a PDF and email. I reference this video because it shows at the end how his report script is called by a server script schedule which is what you want to do. You'd need to add to your report script the logic to see if it's the last day of a semester. As Olger mentioned, this can be a query to a table that has a record for each last day of semester. 

Also see: https://fmhelp.filemaker.com/help/18/fmp/en/#page/FMP_Help%2Frunning-scripts-on-server.html

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.