# Script Functions

Script functions allow you to manage scripts on the inSCADA platform with script/expression. With these functions, you can run scripts, stop them and check their status.

## Get Script Status

#### ins.getScriptStatus(String scriptName)

Provides information about the status of a script.

scriptName : Name of the script.

Return Value: Returns a string of information about the status of the script.

#### Syntax

```javascript
var status=ins.getScriptStatus("Script_01");
if (status==="Scheduled") {
    ins.notify("info","Script_01","Script_01 is scheduled");
}
```

## Activate a Script <a href="#activate-a-script" id="activate-a-script"></a>

#### ins.activateScript(String scriptName) <a href="#ins-activatescript-string-scriptname" id="ins-activatescript-string-scriptname"></a>

Enables a script to run periodically by activating it. It schedules the script.

scriptName : Name of the script.

Return Value: Does not return any value.

#### Syntax

```javascript
ins.activateScript("Script_01");
```

## Deactivate a Script <a href="#deactivate-a-script" id="deactivate-a-script"></a>

#### ins.deactivateScript(String scriptName) <a href="#ins-deactivatescript-string-scriptname" id="ins-deactivatescript-string-scriptname"></a>

Deactivates a script and stops it from running periodically.

scriptName : Name of the script.

Return Value: Does not return any value.

#### Syntax

```javascript
ins.deactivateScript("Script_01");
```
