> For the complete documentation index, see [llms.txt](https://jadelab.gitbook.io/jadegit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jadelab.gitbook.io/jadegit/0.18.0/developers/deployment/scripts.md).

# Scripts

To invoke a script during a deployment after schema changes have been loaded, you can define what scripts need to be run in the `.jadegit` config file in the root folder of the repository (where supported by the deployment format).

Each script to run is defined in a `[[deployment.scripts]]` section in the config file.  This uses the TOML array syntax, allowing multiple scripts to be run (in the order specified).

The scripts are run using or like [jadclient](https://secure.jadeworld.com/JADETech/JADE2025/OnlineDocumentation/#resources/runtimeapps/ch1runninguserapplication/runnonguiclntappwithjadclient.htm), the parameters for which are based on the configuration options below.

During the build process, any entities referred to by the options below are resolved to ensure they're valid.

<table><thead><tr><th width="149">Option</th><th>Description</th></tr></thead><tbody><tr><td>schema / app</td><td>These two options correlates directly to the jadclient parameters, which specify the application context under which the script method needs to be run.</td></tr><tr><td>method</td><td><p>Defines the script method which needs to be executed, which may be the name of a method on the JadeScript class in the current schema context, or it may be a fully/partially qualified name referring to a method on a specific class, possibly in another schema.</p><p></p><p>This correlates to the executeSchema, executeClass, executeMethod &#x26; executeTypeMethod jadclient parameters which are all inferred from the method specified.</p></td></tr><tr><td>param</td><td>Correlates directly to the executeParam jadclient parameter.  Validation checks this is supplied as required for the method being executed.</td></tr><tr><td>transient</td><td>Correlates directly to the executeTransient jadclient parameter.  Validation checks this isn't supplied for type methods.</td></tr></tbody></table>

## Examples

{% code title=".jadegit" %}

```toml
# Running a simple script defined on JadeScript class.
[[deployment.scripts]]
schema="ExampleSchema"
app="ExampleApp"
method="scriptMethod"

# Running a script on a transient instance of a specific class in another schema.
[[deployment.scripts]]
schema="ExampleSchema"
app="ExampleApp"
method="AnotherSchema::SpecificClass::scriptMethodWithParam"
param="Hello World"
transient=true
```

{% endcode %}
