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


Evaluates an expression after a delay.

Component Version macOS Windows Linux Server iOS SDK
Schedule 5.2 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "Schedule.EvaluateAfterDelay"; DelaySeconds; Expression { ; ScriptFileName; ScriptName; RepeatDelay } )   More


Parameter Description Example Flags
DelaySeconds The Number of Seconds to wait before running the script. 10
Expression The expression to evaluate. "Get(CurrentTimeStamp)"
ScriptFileName The name of the file that contains the script to be run. Get(Filename) Optional
ScriptName The exact name of the script to run. "TestScript" Optional
RepeatDelay The number of seconds after which to repeat the script call. 30 Optional


Returns reference number or error.


Evaluates an expression after a delay.
Optional, we can start a script with the result of the query.
Please use Schedule.Release later to remove schedule from list. Non repeating scheduled items are free automatically for you.
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.


Try it:

Set Variable [$expression; Value:"MBS(\"Log\"; \"Evaluate works\")"]
Set Variable [$ref; Value:MBS( "Schedule.EvaluateAfterDelay"; 5; $expression )]

Show/Hide format bar in German:

Set Variable [ $r ; Value: MBS( "Schedule.EvaluateAfterDelay"; ,1; "MBS( \"Menubar.RunMenuCommand\"; List(\"Ansicht\"; \"Formatierungsleiste\") )") ]

Set scrollbar elasticity after delay of 0.1 seconds:

Set Variable [ $r ; Value: MBS( "Schedule.EvaluateAfterDelay"; 0.1; "MBS(\"Window.Scrollbar.SetScrollElasticity\"; 0; \"none\")") ]

Open Scriptworkspace:

# won't work directly in script as we need to delay, let the script end and then the menu command can run:
Set Variable [ $r ; Value: MBS( "Schedule.EvaluateAfterDelay"; 0.1; "MBS( \"Menubar.RunMenuCommand\"; 51319 )") ]

Check in background for a file to appear and trigger script when it exists:

MBS( "Schedule.EvaluateAfterDelay"; 5 ;

"Let ([

path = \"/Users/cs/Desktop/test.txt\" ;
databaseFile = \"Assets.fmp12\";
scriptName = \"Import\";
parameter = \"Your parameter\";

file = MBS(\"Files.FileExists\"; path);

r = If( file = 1; MBS(\"FM.RunScript\"; databaseFile; scriptName; parameter); 0 )]; 0)";
""; ""; 5 )

See also

Example Databases

Blog Entries

This function checks for a license.

Created 21st May 2015, last changed 10th November 2023

Schedule.ClearSQLResult - Schedule.EvaluateAtTime