Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Schedule.StartScriptAtTime

Runs a script in any open FileMaker file.

Component Version macOS Windows Linux Server iOS SDK
Schedule 5.2 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "Schedule.StartScriptAtTime"; Hours; Minutes; Seconds; FileName; ScriptName { ; ScriptParameter; RepeatHour; RepeatMinute; RepeatSecond } )   More

Parameters

Parameter Description Example Flags
Hours The hour of the day at which to call the script. 12
Minutes The minute of the day at which to call the script. 10
Seconds The seconds of the day at which to call the script. 0
FileName The name of the file that contains the script to be run Get(Filename)
ScriptName The exact name of the script to run "TestScript"
ScriptParameter Optional, he Script Parameter to pass to the script Optional
RepeatHour The number of hours to wait between script calls. 1 Optional
RepeatMinute The number of minutes to wait between script calls. 0 Optional
RepeatSecond The number of seconds to wait between script calls. 0 Optional

Result

Returns reference number or error.

Description

Runs a script in any open FileMaker file.
You can also pass a text string to the Script as a Parameter. The parameter can be retrieved by using Get(ScriptParameter) in the script that plug-in is calling.
Please use Schedule.Release later to remove schedule from list. Non repeating scheduled items are free automatically for you.
You define the timestamp with hours, minutes and seconds parameter at which to call the script. Plugin checks regularly if time stamp is reaches and calls as soon as current time is greater or equal the given timestamp. So calls can be delayed if FileMaker is busy!
Our plugin does not provide persistence. You need to schedule things in your scripts if you need them. When FileMaker quits, the plugin forgets the list of schedules.


With plugin version 6.0 or newer the script name can be a script ID number. In that case the plugin queries the script name for the given script ID. This allows to call scripts by ID and avoid problems if scripts are later renamed.

Notice: FileMaker 19.2 adds a fmplugin extended privileges. If you have such an extended privileges to allow the plugin to trigger scripts, you need to grant permissions for it. If such a privilege is not defined, the plugin is allowed to trigger scripts. See FileMaker product documentation for details.

Examples

Run at 10:30 and repeat every 2 hour:

MBS( "Schedule.StartScriptAtTime"; 10; 30; 0; Get(FileName); "testScript"; ""; 2; 0; 0 )

Run daily at 6:10 in morning

MBS( "Schedule.StartScriptAtTime"; 6;10; 0; Get(FileName); "Send Jobs"; ""; 24; 0; 0 )

See also

Release notes

Blog Entries

This function checks for a license.

Created 20th May 2015, last changed 20th April 2017


Schedule.StartScriptAfterDelay - Schedule.StartScriptAtTimeStamp