# MosProcess

The MosProcess object contains methods used to start an external program and get the result of its work.&#x20;

{% hint style="warning" %}
Please note that calling any function of the MosProcess object will immediately put the script module into demo mode if it is not licensed
{% endhint %}

### Methods

| **Name**                            | **Description**                                                                                                                                                                                                                                                           |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| run(fileName, args)                 | Runs an external program without waiting for its execution. Accepts path to the executable file (*fileName*) and arguments of the executable file launch (*args*) as arguments.                                                                                           |
| runAndWait(fileName, args, timeout) | Runs an external program and returns the result of its execution as *MosProcessExecuteResult*. Accepts path to the executable file (*fileName*), arguments of the executable file launch (*args*) and program execution timeout in milliseconds (*timeout*) as arguments. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monokot.io/scripts/api/mosprocess.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
