Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   11.6    Statistic    FMM    Blog  

Schedule.ExecuteSQLAtTime

Runs a sql query in any open FileMaker file.

Component Version macOS Windows Linux Server iOS SDK
Schedule 5.2 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "Schedule.ExecuteSQLAtTime"; Hours; Minutes; Seconds; FileName; SQL Statement { ; ScriptFileName; ScriptName; Column Delimiter; Record Delimiter; RepeatHour; RepeatMinute; RepeatSecond; Params... } )   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 target database name. Can be empty to not limit query to one database. ""
SQL Statement SQL Statement as a Text string
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
Column Delimiter Columns Separator, only used with SELECT statement. Default is TAB. 9 Optional
Record Delimiter Record Separator, only used with SELECT statement, Default is Return 13 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
Params... Optional, pass here parameters. One parameter to this function for each parameter you want to pass to the SQL statement. 123 Optional

Result

Returns reference number or error.

Description

Runs a sql query in any open FileMaker file.
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.
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.
Unless you call Schedule.Check to perform due schedules now, the schedules are performed at idle time, so all the SQL commands are available including INSERT, DELETE, UPDATE and even ALTER TABLE.

This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.
Please repeat Params parameter as often as you need.


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.

FileMaker 19.2 adds a fmplugin extended privileges. You my need to add such an extended privileges to allow the plugin to trigger scripts. See FileMaker product documentation for details.

See also

Release notes

Created 21st May 2015, last changed 5th June 2021


Schedule.ExecuteSQLAfterDelay - Schedule.ExecuteSQLAtTimeStamp

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins

Start Chat