Schedule.Release
----------------

Releases schedule reference.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Schedule](component_Schedule.md) | [5.2](newinversion52.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "Schedule.Release"; ScheduleRef ) 

**MBS**( **"Schedule.Release";** /\* Releases schedule reference. \*/  
**$ScheduleRef**) /\* The reference for a scheduled script call or sql query as returned by Schedule.StartScript\* functions or Schedule.ExecuteSQL\* functions.e.g. $ref \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ScheduleRef | The reference for a scheduled script call or sql query as returned by Schedule.StartScript\* functions or Schedule.ExecuteSQL\* functions. | $ref |

### Result

Returns OK or error.

### Description

Releases schedule reference.  
This will free all memory used and stops the schedule.  
### Examples

Release now:

 MBS ( "Schedule.Release"; $ScheduleRef )  
Start a script once in 10 seconds and release:

 Set Variable\[ $ref ; MBS ( "[Schedule.StartScriptAfterDelay](ScheduleStartScriptAfterDelay.md)"; 10; Get(FileName); "testScript"; "Hello World" ) \]  
Set Variable\[ $r ; MBS ("Schedule.Release"; $ref ) \]  
\# script will never be called as schedule was destroyed!   
### See also

- [Schedule.EvaluateAfterDelay](ScheduleEvaluateAfterDelay.md)
- [Schedule.EvaluateAtTime](ScheduleEvaluateAtTime.md)
- [Schedule.EvaluateAtTimeStamp](ScheduleEvaluateAtTimeStamp.md)
- [Schedule.EvaluateOnIdle](ScheduleEvaluateOnIdle.md)
- [Schedule.ExecuteSQLAfterDelay](ScheduleExecuteSQLAfterDelay.md)
- [Schedule.ExecuteSQLAtTime](ScheduleExecuteSQLAtTime.md)
- [Schedule.ExecuteSQLOnIdle](ScheduleExecuteSQLOnIdle.md)
- [Schedule.ReleaseAll](ScheduleReleaseAll.md)
- [Schedule.StartScriptAtTime](ScheduleStartScriptAtTime.md)
- [Schedule.StartScriptAtTimeStamp](ScheduleStartScriptAtTimeStamp.md)

### Example Databases

- [MongoDB/MongoDB Audit](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/MongoDB/MongoDB%20Audit.shtml#2ScriptAnchor_)
- [Schedules/OnRecordEdit Trigger](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Schedules/OnRecordEdit%20Trigger.shtml#1ScriptAnchor_)
- [Window/Schedule Moved Trigger](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Schedule%20Moved%20Trigger.shtml#1ScriptAnchor_)
- [Window/Window Activation Trigger](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20Activation%20Trigger.shtml#1ScriptAnchor_)

### Blog Entries

- [Window Activation Trigger](https://www.mbsplugins.de/archive/2022-10-23/Window_Activation_Trigger/monkeybreadsoftware_blog_filemaker)
- [Script trigger for moving window](https://www.mbsplugins.de/archive/2022-10-07/Script_trigger_for_moving_wind/monkeybreadsoftware_blog_filemaker)
- [OnRecordEdit Trigger in FileMaker](https://www.mbsplugins.de/archive/2022-06-06/OnRecordEdit_Trigger_in_FileMa/monkeybreadsoftware_blog_filemaker)
- [Record Creation Script Trigger](https://www.mbsplugins.de/archive/2020-09-03/Record_Creation_Script_Trigger/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 20th May 2015 , last changed 27th May 2015

  
[Schedule.List](ScheduleList.md) - [Schedule.ReleaseAll](ScheduleReleaseAll.md)

[HTML Version](ScheduleRelease.shtml)